Package tv.hd3g.authkit.mod.service
Class ValidPasswordPolicyServiceImpl
- java.lang.Object
-
- tv.hd3g.authkit.mod.service.ValidPasswordPolicyServiceImpl
-
- All Implemented Interfaces:
ValidPasswordPolicyService
@Service public class ValidPasswordPolicyServiceImpl extends Object implements ValidPasswordPolicyService
https://en.wikipedia.org/wiki/Password_policy#cite_ref-sp800-63B_13-0 Password base: https://wiki.skullsecurity.org/index.php?title=Passwords
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface tv.hd3g.authkit.mod.service.ValidPasswordPolicyService
ValidPasswordPolicyService.PasswordValidationLevel
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>stupidLettersNumbers0000 1111 2222 ... dddd eeee ffff ...static List<String>stupidPasswordWords
-
Constructor Summary
Constructors Constructor Description ValidPasswordPolicyServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckPasswordValidation(String username, Password password, ValidPasswordPolicyService.PasswordValidationLevel level)- Will check 8 characters in (minSize/strongMinSize) - Ignore spaces in count - avoid passwords consisting of repetitive or sequential characters (e.g.static List<String>split(String text, String what)Special split: if text="aaa@bbb" and what="@" to return "aaa@bbb", "aaa", "bbb"static Stream<String>splitAll(String text, String... what)Call split() for each what, and accumulate all.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tv.hd3g.authkit.mod.service.ValidPasswordPolicyService
checkPasswordValidation
-
-
-
-
Method Detail
-
checkPasswordValidation
public void checkPasswordValidation(String username, Password password, ValidPasswordPolicyService.PasswordValidationLevel level) throws PasswordComplexityException
- Will check 8 characters in (minSize/strongMinSize) - Ignore spaces in count - avoid passwords consisting of repetitive or sequential characters (e.g. ‘aaaaaa’, ‘1234abcd’) - avoid context-specific words, such as the name of the service, the username, and derivatives thereof- Specified by:
checkPasswordValidationin interfaceValidPasswordPolicyService- Throws:
PasswordComplexityException
-
split
public static List<String> split(String text, String what)
Special split: if text="aaa@bbb" and what="@" to return "aaa@bbb", "aaa", "bbb"- Parameters:
text- source textwhat- the chain/char to search- Returns:
- list of splited text
-
-