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:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>getAuthorities()Returns the authorities granted to the user.StringgetPassword()Returns the password hash for the user.UsergetUser()Returns the user.StringgetUsername()Returns the username used to authenticate the user.booleanisAccountNonExpired()Returns whether the user's account has expired.booleanisAccountNonLocked()Returns whether the user's account is locked.booleanisCredentialsNonExpired()Returns whether the user's credentials have expired.booleanisEnabled()Returns whether the user's account is enabled.
-
-
-
Method Detail
-
getAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
Returns the authorities granted to the user.- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.userdetails.UserDetails- Returns:
- the authorities
-
getPassword
public String 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
public User getUser()
Returns the user.- Returns:
- the user
-
getUsername
public String 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
-
-