Interface User

    • Method Detail

      • getId

        default String getId()
        This should return a global user id. Global user ids are built MANAGER_ID:USER_IDENTIFIER User identifier must not be the username but must be unique, e.g. for LDAP it may be the DN.
        Returns:
      • getUsername

        String getUsername()
        Gets the User Name for this user. This field is required, and should never be empty.
        Returns:
        the user name.
      • setUsername

        void setUsername​(String name)
        Sets the User Name for this user. This field is required, and should never be empty.
        Parameters:
        name - the user name.
      • getFullName

        String getFullName()
        Gets the Full Name for this user. This field is required, and should never be empty.
        Returns:
        the full name.
      • setFullName

        void setFullName​(String name)
        Sets the Full Name for this user. This field is required, and should never be empty.
        Parameters:
        name - the full name.
      • getEmail

        String getEmail()
        Gets the email address for this user. This field is required, and should never be empty.
        Returns:
        the email address.
      • setEmail

        void setEmail​(String address)
        Sets the email address for this user. This field is required, and should never be empty.
        Parameters:
        address - the email address.
      • getPassword

        String getPassword()
        Gets the Raw (unencoded) Password. Used only on password change requests.

        Notes for User Providers

        1. Providers need to look for a value in here to indicate if the user is intending to change their password.
        2. The providers of this interface need to use this field, encode the password, place it's value into the encodedPassword field, and clear out the raw unencoded password field.
        3. This field should never be stored on disk.
        Returns:
        the raw encoded password.
      • setPassword

        void setPassword​(String rawPassword)
        Sets the raw (unencoded) password for this user.
        Parameters:
        rawPassword - the raw unencoded password for this user.
        See Also:
        getPassword()
      • setEncodedPassword

        void setEncodedPassword​(String encodedPassword)
        Sets the Encoded Password. This field is populated by the UserManager process.
        Parameters:
        encodedPassword -
      • getLastPasswordChange

        Date getLastPasswordChange()
        Gets the Date of the Last Password Change. Used by password management policies to enforce password expiration rules.
        Returns:
        the date of the last password change.
      • setLastPasswordChange

        void setLastPasswordChange​(Date passwordChangeDate)
        Sets the Last Password Change Date. This field is populated by the UserManager process.
        Parameters:
        passwordChangeDate - the date that the last password change occured.
      • getPreviousEncodedPasswords

        List<StringgetPreviousEncodedPasswords()
        Gets the list of previous password (in encoded format). Used by password management policies to enforce password reuse rules.
        Returns:
        the list of String objects. Represents previous passwords (in encoded format).
      • setPreviousEncodedPasswords

        void setPreviousEncodedPasswords​(List<String> encodedPasswordList)
        Sets the list of previous passwords (in encoded format)
        Parameters:
        encodedPasswordList - (list of String objects.) the previously passwords in encoded format.
      • addPreviousEncodedPassword

        void addPreviousEncodedPassword​(String encodedPassword)
        Add encoded password to previously passwords in encoded format.
        Parameters:
        encodedPassword - the encoded password to add.
      • isPermanent

        boolean isPermanent()
        Gets the flag indicating if this user is a permanent user or not. Usually Root / Admin / Guest users are flagged as such.
      • setPermanent

        void setPermanent​(boolean permanent)
        Sets the permanent flag for this user. Users such as Root / Admin / Guest are typically flagged as permanent.
        Parameters:
        permanent - true if permanent.
      • isLocked

        boolean isLocked()
        Determines if this user account is locked from use or not. This state is set from an administrative point of view, or due to excessive failed login attempts.
        Returns:
        true if account is locked.
      • setLocked

        void setLocked​(boolean locked)
        Sets the locked state of this account.
        Parameters:
        locked - true if account is to be locked.
      • isPasswordChangeRequired

        boolean isPasswordChangeRequired()
        Determines if this user account must change their password on next login.
        Returns:
        true if user must change password on next login.
      • setPasswordChangeRequired

        void setPasswordChangeRequired​(boolean changeRequired)
        Sets the flag to indicate if this user must change their password on next login.
        Parameters:
        changeRequired - true if user must change password on next login.
      • isValidated

        boolean isValidated()
        Gets the flag indicating if this user has been validated (or not)
        Returns:
        true if validated.
      • setValidated

        void setValidated​(boolean valid)
        Sets the flag indicating if this user has been validated (or not)
        Parameters:
        valid - true if validated.
      • getCountFailedLoginAttempts

        int getCountFailedLoginAttempts()
        Get Count of Failed Login Attempts.
        Returns:
        the count of failed login attempts.
      • setCountFailedLoginAttempts

        void setCountFailedLoginAttempts​(int count)
        Set the count of failed login attempts.
        Parameters:
        count - the count of failed login attempts.
      • getAccountCreationDate

        Date getAccountCreationDate()
        Get the Creation Date for this account.
        Returns:
        the date of creation for this account.
      • getLastLoginDate

        Date getLastLoginDate()
        Get the Last Successful Login Date for this account.
        Returns:
        the date of the last successful login
      • setLastLoginDate

        void setLastLoginDate​(Date date)
        Sets the Last Successful Login Date for this account.
      • getUserManagerId

        String getUserManagerId()
        as we can user multiple userManagers implementation we must track from which one this one comes.
        Returns:
        userManager id
        Since:
        2.1