Package africa.absa.inception.security
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 Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>Returns the authorities granted to the user.Returns the password hash for the user.getUser()Returns the user.Returns the username used to authenticate the user.booleanReturns whether the user's account has expired.booleanReturns whether the user's account is locked.booleanReturns whether the user's credentials have expired.booleanReturns whether the user's account is enabled.
-
Method Details
-
getAuthorities
Returns the authorities granted to the user.- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- the authorities
-
getPassword
Returns the password hash for the user.- Specified by:
getPasswordin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- the password hash for the user
-
getUser
Returns the user.- Returns:
- the user
-
getUsername
Returns the username used to authenticate the user.- Specified by:
getUsernamein interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- the username
-
isAccountNonExpired
public boolean isAccountNonExpired()Returns whether the user's account has expired.- Specified by:
isAccountNonExpiredin interfaceorg.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:
isAccountNonLockedin interfaceorg.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:
isCredentialsNonExpiredin interfaceorg.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:
isEnabledin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- true if the user's account is enabled or false otherwise
-