Class CronappUserDetails

  • All Implemented Interfaces:
    Serializable, org.springframework.security.core.userdetails.UserDetails

    public class CronappUserDetails
    extends Object
    implements org.springframework.security.core.userdetails.UserDetails
    Represents a user in the system The normalizedUserName and normalizedEmail are there for performance reasons and are used to validate the case insensitive uniqueness of the userName and email fields. They are persisted in the database in order be able to create index on them, thus making the lookups by the normalized user name and email sargable.
    See Also:
    Serialized Form
    • Constructor Detail

      • CronappUserDetails

        protected CronappUserDetails()
    • Method Detail

      • getName

        public String getName()
        Returns:
        The user's name.
      • getUserName

        public String getUserName()
        Returns:
        The user name for this user.
      • getNormalizedUserName

        public String getNormalizedUserName()
        Returns:
        The normalized user name for this user.
      • getEmail

        public String getEmail()
        Returns:
        The email address for this user.
      • getNormalizedEmail

        public String getNormalizedEmail()
        Returns:
        The normalized email address for this user.
      • isEmailConfirmed

        public boolean isEmailConfirmed()
        Returns:
        A flag indicating if a user has confirmed their email address.
      • getAuthorities

        public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
        Specified by:
        getAuthorities in interface org.springframework.security.core.userdetails.UserDetails
      • getPassword

        public String getPassword()
        Specified by:
        getPassword in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        A salted and hashed representation of the password for this user.
      • getUsername

        public String getUsername()
        Specified by:
        getUsername in interface org.springframework.security.core.userdetails.UserDetails
      • isAccountNonExpired

        public boolean isAccountNonExpired()
        Specified by:
        isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      • isAccountNonLocked

        public boolean isAccountNonLocked()
        Specified by:
        isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
      • isCredentialsNonExpired

        public boolean isCredentialsNonExpired()
        Specified by:
        isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      • isEnabled

        public boolean isEnabled()
        Specified by:
        isEnabled in interface org.springframework.security.core.userdetails.UserDetails
      • getSecurityStamp

        public String getSecurityStamp()
        Returns:
        A random value that must change whenever a users credentials change (password changed, login removed)
      • getPhoneNumber

        public String getPhoneNumber()
        Returns:
        A telephone number for the user.
      • isPhoneNumberConfirmed

        public boolean isPhoneNumberConfirmed()
        Returns:
        A flag indicating if a user has confirmed their telephone address.
      • isTwoFactorEnabled

        public boolean isTwoFactorEnabled()
        Returns:
        A flag indicating if two factor authentication is enabled for this user.
      • getLockoutEnd

        public OffsetDateTime getLockoutEnd()
        Returns:
        The date and time when any user lockout ends.
      • isLockoutEnabled

        public boolean isLockoutEnabled()
        Returns:
        A flag indicating if the user could be locked out.
      • getAccessFailedCount

        public int getAccessFailedCount()
        Returns:
        The number of failed login attempts for the current user.
      • getPicture

        public byte[] getPicture()
      • getPayload

        public Map<String,​Object> getPayload()
        Returns:
        The payload received from the external authenticator