Class UserMustChangePasswordVerifier


  • public class UserMustChangePasswordVerifier
    extends Object
    Class that provides tools to verify if the user have to change his password or if the user will soon have to change his password. User: Yohann Chastagnier Date: 14/02/13
    • Field Detail

      • ERROR_PWD_MUST_BE_CHANGED_ON_FIRST_LOGIN

        public static final String ERROR_PWD_MUST_BE_CHANGED_ON_FIRST_LOGIN
        See Also:
        Constant Field Values
      • ERROR_PWD_AND_EMAIL_MUST_BE_CHANGED_ON_FIRST_LOGIN

        public static final String ERROR_PWD_AND_EMAIL_MUST_BE_CHANGED_ON_FIRST_LOGIN
        See Also:
        Constant Field Values
      • isThatUserMustChangePasswordOnFirstLogin

        protected static boolean isThatUserMustChangePasswordOnFirstLogin
      • isThatUserMustFillEmailAddressOnFirstLogin

        protected static boolean isThatUserMustFillEmailAddressOnFirstLogin
      • isMaxConnectionActivated

        protected static boolean isMaxConnectionActivated
      • isOffsetConnectionActivated

        protected static boolean isOffsetConnectionActivated
      • nbMaxConnectionsForForcing

        protected static int nbMaxConnectionsForForcing
      • nbMaxConnectionsForProposing

        protected static int nbMaxConnectionsForProposing
      • otherSettings

        protected static final SettingBundle otherSettings
    • Constructor Detail

      • UserMustChangePasswordVerifier

        protected UserMustChangePasswordVerifier​(UserDetail user)
        Default constructor.
        Parameters:
        user -
    • Method Detail

      • setup

        protected static void setup​(boolean userMustChangePasswordOnFirstLogin,
                                    boolean userMustFillEmailAddressOnFirstLogin,
                                    int nbSuccessfulUserConnectionsBeforeForcingPasswordChange,
                                    int nbSuccessfulUserConnectionsBeforeProposingToChangePassword)
        Initializing settings.
      • getDestinationOnFirstLogin

        public String getDestinationOnFirstLogin​(javax.servlet.http.HttpServletRequest request)
        Gets the destination on first login.
        Returns:
      • notifyPasswordChange

        public void notifyPasswordChange()
        Notifies that user has changed his password.
      • setUser

        public void setUser​(UserDetail user)
        Sets the user.
        Parameters:
        user - the user to set
      • getUser

        public UserDetail getUser()
        Gets the user.
        Returns:
        the user
      • getUserById

        protected static UserDetail getUserById​(String userId)
        Gets a user from its identifier.
        Parameters:
        userId - the unique identifier of the user
        Returns:
        the user