com.atlassian.crowd.directory
Class PasswordConstraintsLoaderImpl

java.lang.Object
  extended by com.atlassian.crowd.directory.PasswordConstraintsLoaderImpl
All Implemented Interfaces:
PasswordConstraintsLoader

public class PasswordConstraintsLoaderImpl
extends Object
implements PasswordConstraintsLoader

Instantiates the active PasswordConstraint's for a directory based on the directory's attributes. This implementation uses attributes defined on an InternalDirectory.

See Also:
AbstractInternalDirectory.ATTRIBUTE_PASSWORD_MINIMUM_LENGTH, AbstractInternalDirectory.ATTRIBUTE_PASSWORD_MINIMUM_SCORE, AbstractInternalDirectory.ATTRIBUTE_PASSWORD_REGEX

Field Summary
static String PASSWORD_POLICY_FEATURE
          The name of the feature toggle for password policy.
 
Constructor Summary
PasswordConstraintsLoaderImpl(PasswordScoreService passwordScoreService, com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager)
           
 
Method Summary
 Set<PasswordConstraint> getFromDirectoryAttributes(long directoryId, Attributes attributes)
          Returns all constraints that are configured for a directory.
protected  boolean isPasswordPolicyEnabled()
          Will return true if the password policy feature is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PASSWORD_POLICY_FEATURE

public static final String PASSWORD_POLICY_FEATURE
The name of the feature toggle for password policy.

See Also:
Constant Field Values
Constructor Detail

PasswordConstraintsLoaderImpl

public PasswordConstraintsLoaderImpl(PasswordScoreService passwordScoreService,
                                     com.atlassian.sal.api.features.DarkFeatureManager darkFeatureManager)
Method Detail

getFromDirectoryAttributes

public Set<PasswordConstraint> getFromDirectoryAttributes(long directoryId,
                                                          Attributes attributes)
Description copied from interface: PasswordConstraintsLoader
Returns all constraints that are configured for a directory.

Specified by:
getFromDirectoryAttributes in interface PasswordConstraintsLoader
Parameters:
directoryId - a directory's id
attributes - a directory's Attributes
Returns:
a set of PasswordConstraint's

isPasswordPolicyEnabled

protected boolean isPasswordPolicyEnabled()
Will return true if the password policy feature is enabled. This feature is controlled by the flag PASSWORD_POLICY_FEATURE

Returns:
true if the password policy feature is enabled


Copyright © 2016 Atlassian. All Rights Reserved.