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:
-
Constructor Summary
ConstructorDescriptionAccountUserDetails
(com.avoka.fc.core.security.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
Modifier and TypeMethodDescriptionCollection
<? extends org.springframework.security.core.GrantedAuthority> Returns a collection of Granted Authorities associated with the userReturns the user password attributegetUser()
Returns the userReturns the username attributeboolean
Will always return trueboolean
Check if the user's account is not in a locked statusboolean
Will always return trueboolean
Check if the user's account is enabledtoString()
Returns a string representation of the Account User Details object
-
Constructor Details
-
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
Create a unit testing AccountUserDetails value object with the given fields.- Parameters:
fields
- the account user details entity fields (required)
-
-
Method Details
-
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
Returns the user password attribute- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- a user's password
-
getUser
Returns the user- Returns:
- the user.
- Since:
- 21.5.0
-
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
-
toString
Returns a string representation of the Account User Details object
-