Package com.avoka.tm.vo
Class AccountUserDetails
- java.lang.Object
-
- com.avoka.tm.vo.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 Summary
Constructors Constructor Description AccountUserDetails()
AccountUserDetails(AccountUserDetails accountUserDetails)
Create a AccountUserDetails value object with the given parameters.AccountUserDetails(Map fields)
Create a unit testing AccountUserDetails value object with the given fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends org.springframework.security.core.GrantedAuthority>
getAuthorities()
Returns a collection of Granted Authorities associated with the userString
getPassword()
Returns the user password attributeUser
getUser()
Returns the userString
getUsername()
Returns the username attributeboolean
isAccountNonExpired()
Will always return trueboolean
isAccountNonLocked()
Check if the user's account is not in a locked statusboolean
isCredentialsNonExpired()
Will always return trueboolean
isEnabled()
Check if the user's account is enabledString
toString()
Returns a string representation of the Account User Details object
-
-
-
Constructor Detail
-
AccountUserDetails
public AccountUserDetails(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 interfaceorg.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 interfaceorg.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 interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- a user's username
-
isAccountNonExpired
public boolean isAccountNonExpired()
Will always return true- Specified by:
isAccountNonExpired
in interfaceorg.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 interfaceorg.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 interfaceorg.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 interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- true if the account is enabled
-
-