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
-
-
Field Summary
Fields Modifier and Type Field Description Set<String>
authorities
List of groups for granted AuthoritiesUser
user
The User associated with the details
-
Constructor Summary
Constructors Constructor Description AccountUserDetails(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
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 attributeString
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(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(Map fields)
Create a unit testing AccountUserDetails value object with the given fields.- Parameters:
fields
- the form 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
-
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
-
-