Class DefaultPasswordRulesService
- java.lang.Object
-
- org.silverpeas.core.security.authentication.password.service.DefaultPasswordRulesService
-
- All Implemented Interfaces:
PasswordRulesService
@Service @Singleton public class DefaultPasswordRulesService extends Object implements PasswordRulesService
User: Yohann Chastagnier Date: 07/01/13
-
-
Field Summary
Fields Modifier and Type Field Description protected static int
nbMatchingCombinedRules
protected static SettingBundle
settings
-
Constructor Summary
Constructors Constructor Description DefaultPasswordRulesService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PasswordCheck
check(String password)
Checks server required and combined password rule on the given password.String
generate()
Generates a random password from existing rules.Collection<PasswordRule>
getCombinedRules()
Gets server combined password rules.String
getExtraRuleMessage(String language)
Gets additional rule message.Collection<PasswordRule>
getRequiredRules()
Gets server required password rules.PasswordRule
getRule(PasswordRuleType passwordRuleType)
Gets a server password rule from its type.Collection<PasswordRule>
getRules()
Gets server password rules.protected void
loadRules()
Loading just after the server is started all activated server password rules.
-
-
-
Field Detail
-
settings
protected static SettingBundle settings
-
nbMatchingCombinedRules
protected static int nbMatchingCombinedRules
-
-
Method Detail
-
loadRules
@PostConstruct protected void loadRules()
Loading just after the server is started all activated server password rules.
-
getRule
public PasswordRule getRule(PasswordRuleType passwordRuleType)
Description copied from interface:PasswordRulesService
Gets a server password rule from its type.- Specified by:
getRule
in interfacePasswordRulesService
- Returns:
-
getRules
public Collection<PasswordRule> getRules()
Description copied from interface:PasswordRulesService
Gets server password rules.- Specified by:
getRules
in interfacePasswordRulesService
- Returns:
-
getRequiredRules
public Collection<PasswordRule> getRequiredRules()
Description copied from interface:PasswordRulesService
Gets server required password rules.- Specified by:
getRequiredRules
in interfacePasswordRulesService
- Returns:
-
getCombinedRules
public Collection<PasswordRule> getCombinedRules()
Description copied from interface:PasswordRulesService
Gets server combined password rules.- Specified by:
getCombinedRules
in interfacePasswordRulesService
- Returns:
-
check
public PasswordCheck check(String password)
Description copied from interface:PasswordRulesService
Checks server required and combined password rule on the given password.- Specified by:
check
in interfacePasswordRulesService
- Returns:
- Password rules in error if any.
-
generate
public String generate()
Description copied from interface:PasswordRulesService
Generates a random password from existing rules.- Specified by:
generate
in interfacePasswordRulesService
- Returns:
-
getExtraRuleMessage
public String getExtraRuleMessage(String language)
Description copied from interface:PasswordRulesService
Gets additional rule message. All rules explicited in this message are not verifiable within Silverpeas services.- Specified by:
getExtraRuleMessage
in interfacePasswordRulesService
- Returns:
-
-