Class UserPasswordCriteriaHelper

java.lang.Object
com.skava.helper.UserPasswordCriteriaHelper

public final class UserPasswordCriteriaHelper extends Object
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 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 - Holds PwdHashingStrategy 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 - Holds List of String 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 - Holds UserCommonServices 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 - Holds CollectionCommonServices object used for loading the value from database.
      collectionAttributes - Holds the List of CollectionAttributeEntity 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)