Class AccountUserDetails

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

    public class AccountUserDetails
    extends Object
    implements org.springframework.security.core.userdetails.UserDetails
    Provide an AccountUserDetails value object class.
    Since:
    19.11.0
    See Also:
    Serialized Form
    • Constructor Detail

      • AccountUserDetails

        public AccountUserDetails​(com.avoka.fc.core.security.AccountUserDetails accountUserDetails)
        Create a AccountUserDetails value object with the given parameters.
        Parameters:
        accountUserDetails - the AccountUserDetails entity parameter (required)
      • AccountUserDetails

        public AccountUserDetails()
      • AccountUserDetails

        public AccountUserDetails​(Map fields)
        Create a unit testing AccountUserDetails value object with the given fields.
        Parameters:
        fields - the account user details entity fields (required)
    • Method Detail

      • getAuthorities

        public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
        Returns a collection of Granted Authorities associated with the user
        Specified by:
        getAuthorities in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        a collection of org.springframework.security.core.GrantedAuthority
      • getPassword

        public String getPassword()
        Returns the user password attribute
        Specified by:
        getPassword in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        a user's password
      • getUser

        public User getUser()
        Returns the user
        Returns:
        the user.
        Since:
        21.5.0
      • getUsername

        public String getUsername()
        Returns the username attribute
        Specified by:
        getUsername in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        a user's username
      • isAccountNonExpired

        public boolean isAccountNonExpired()
        Will always return true
        Specified by:
        isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        always returns true
      • isAccountNonLocked

        public boolean isAccountNonLocked()
        Check if the user's account is not in a locked status
        Specified by:
        isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        true if the account has not locked
      • isCredentialsNonExpired

        public boolean isCredentialsNonExpired()
        Will always return true
        Specified by:
        isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        always returns true
      • isEnabled

        public boolean isEnabled()
        Check if the user's account is enabled
        Specified by:
        isEnabled in interface org.springframework.security.core.userdetails.UserDetails
        Returns:
        true if the account is enabled
      • toString

        public String toString()
        Returns a string representation of the Account User Details object
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.