Class DefaultPasswordGenerator
- java.lang.Object
-
- org.apache.syncope.core.spring.security.DefaultPasswordGenerator
-
- All Implemented Interfaces:
PasswordGenerator
public class DefaultPasswordGenerator extends Object implements PasswordGenerator
Generate random passwords according to given policies. When no minimum and / or maximum length are specified, default values are set. WARNING: This class only takesDefaultPasswordRuleConf
into account.
-
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
LOG
protected static int
MIN_LENGTH_IF_ZERO
protected Map<String,PasswordRule>
perContextPasswordRules
protected static int
VERY_MAX_LENGTH
protected static int
VERY_MIN_LENGTH
-
Constructor Summary
Constructors Constructor Description DefaultPasswordGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
generate(List<PasswordPolicy> policies)
protected String
generate(DefaultPasswordRuleConf ruleConf)
String
generate(ExternalResource resource, List<Realm> realms)
protected List<PasswordRule>
getPasswordRules(PasswordPolicy policy)
protected DefaultPasswordRuleConf
merge(List<DefaultPasswordRuleConf> defaultRuleConfs)
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
VERY_MIN_LENGTH
protected static final int VERY_MIN_LENGTH
- See Also:
- Constant Field Values
-
VERY_MAX_LENGTH
protected static final int VERY_MAX_LENGTH
- See Also:
- Constant Field Values
-
MIN_LENGTH_IF_ZERO
protected static final int MIN_LENGTH_IF_ZERO
- See Also:
- Constant Field Values
-
perContextPasswordRules
protected final Map<String,PasswordRule> perContextPasswordRules
-
-
Method Detail
-
generate
@Transactional(readOnly=true) public String generate(ExternalResource resource, List<Realm> realms)
- Specified by:
generate
in interfacePasswordGenerator
-
getPasswordRules
protected List<PasswordRule> getPasswordRules(PasswordPolicy policy)
-
generate
public String generate(List<PasswordPolicy> policies)
- Specified by:
generate
in interfacePasswordGenerator
-
merge
protected DefaultPasswordRuleConf merge(List<DefaultPasswordRuleConf> defaultRuleConfs)
-
generate
protected String generate(DefaultPasswordRuleConf ruleConf)
-
-