Class UserDetails

java.lang.Object
africa.absa.inception.security.UserDetails
All Implemented Interfaces:
Serializable, org.springframework.security.core.userdetails.UserDetails

public class UserDetails extends Object implements org.springframework.security.core.userdetails.UserDetails
The UserDetails class stores the details for a user.
Author:
Marcus Portmann
See Also:
  • Method Details

    • getAuthorities

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

      public String getPassword()
      Returns the password hash for the user.
      Specified by:
      getPassword in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      the password hash for the user
    • getUser

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

      public String getUsername()
      Returns the username used to authenticate the user.
      Specified by:
      getUsername in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      the username
    • isAccountNonExpired

      public boolean isAccountNonExpired()
      Returns whether the user's account has expired.
      Specified by:
      isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      true if the user's account has NOT expired or false otherwise
    • isAccountNonLocked

      public boolean isAccountNonLocked()
      Returns whether the user's account is locked.
      Specified by:
      isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      true if the user's account is NOT locked or false otherwise
    • isCredentialsNonExpired

      public boolean isCredentialsNonExpired()
      Returns whether the user's credentials have expired.
      Specified by:
      isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      true if the user's credentials have NOT expired or false otherwise
    • isEnabled

      public boolean isEnabled()
      Returns whether the user's account is enabled.
      Specified by:
      isEnabled in interface org.springframework.security.core.userdetails.UserDetails
      Returns:
      true if the user's account is enabled or false otherwise