Package com.skava.helper
Class UserPasswordCriteriaHelper
java.lang.Object
com.skava.helper.UserPasswordCriteriaHelper
This helper class contains methods that performs password checking with old passwords and check whether the new
password should not repeat with N number of old passwords.
- Author:
- Infosys Equinox
-
Method Summary
Modifier and TypeMethodDescriptioncheckNewPasswordWithOldPasswordList
(PwdHashingStrategy passwordHashingAlgorithm, String newPassword, String hashedNewPassword, List<String> oldPasswordList, int collectionPropsLimit, String locale, UserCommonServices userCommonServices) This method is used to check new Password with old password list.static boolean
checkPasswordExpired
(UserAuthRequest request, AuthenticationConfig authenticationConfig, CredentialsEntity userCred) static int
getPasswordLimt
(long collectionId, CollectionCommonServices collectionCommonServices, List<CollectionAttributeEntity> collectionAttributes) This method is used to load password limit value from DB.
-
Method Details
-
checkNewPasswordWithOldPasswordList
public static List<String> checkNewPasswordWithOldPasswordList(PwdHashingStrategy passwordHashingAlgorithm, String newPassword, String hashedNewPassword, List<String> oldPasswordList, int collectionPropsLimit, String locale, UserCommonServices userCommonServices) This method is used to check new Password with old password list.- Parameters:
passwordHashingAlgorithm
- HoldsPwdHashingStrategy
which is user password hashing algorithm is used for password hashing.newPassword
- Indicates the new password which is used for checking the passwords.hashedNewPassword
- Indicates the hashed password which is used for checking the passwords.oldPasswordList
- HoldsList
ofString
which contains old password list used for checking the old passwords..collectionPropsLimit
- Indicates the limit for storing the old passwords. used for checking the old passwords..locale
- Indicates the locale which is used for response messages.userCommonServices
- HoldsUserCommonServices
for checking the old password with new password.- Returns:
- The List of oldPasswords.
-
getPasswordLimt
public static int getPasswordLimt(long collectionId, CollectionCommonServices collectionCommonServices, List<CollectionAttributeEntity> collectionAttributes) This method is used to load password limit value from DB.- Parameters:
collectionId
- Indicates the collection id which is used to load the value from DB.collectionCommonServices
- HoldsCollectionCommonServices
object used for loading the value from database.collectionAttributes
- Holds theList
ofCollectionAttributeEntity
object used for loading the value from database.- Returns:
- The valid integer value from database or default value of password limit.
-
checkPasswordExpired
public static boolean checkPasswordExpired(UserAuthRequest request, AuthenticationConfig authenticationConfig, CredentialsEntity userCred)
-