Package com.avoka.fc.core.security
Class AccountUserDetails
java.lang.Object
com.avoka.fc.core.security.AccountUserDetails
- All Implemented Interfaces:
Serializable
,org.springframework.security.core.userdetails.UserDetails
public class AccountUserDetails
extends Object
implements org.springframework.security.core.userdetails.UserDetails
Provides an AccountUser UserDetails adaptor.
- See Also:
-
Constructor Summary
ConstructorDescriptionAccountUserDetails
(UserAccount userAccount) Create a new UserDetailsAdaptor object based on the given user account.AccountUserDetails
(UserAccount userAccount, Collection<org.springframework.security.core.GrantedAuthority> authorities) Create a new UserDetailsAdaptor object based on the given user account.AccountUserDetails
(UserAccount userAccount, Set<String> groupNames) Create a new UserDetailsAdaptor object based on the given user account and groups (granted authorities). -
Method Summary
Modifier and TypeMethodDescriptionCollection
<org.springframework.security.core.GrantedAuthority> Return the list of authorities associated with the userReturn the password.Return the password salt if defined.Return the underlying user account.Return the user login name or principal.boolean
Return whether the account has not yet expired (currently always returns true).boolean
Return whether the account has not been locked.boolean
Return whether the account credentials have not yet expired (currently always returns true)boolean
Return whether the account is enabled.
-
Constructor Details
-
AccountUserDetails
public AccountUserDetails(UserAccount userAccount, Collection<org.springframework.security.core.GrantedAuthority> authorities) Create a new UserDetailsAdaptor object based on the given user account.- Parameters:
userAccount
- a valid system user account (required)authorities
- the granted user authorities or groups the user belongs to- Since:
- 3.6.0
-
AccountUserDetails
Create a new UserDetailsAdaptor object based on the given user account.- Parameters:
userAccount
- a valid system user account (required)- Since:
- 3.6.0
-
AccountUserDetails
Create a new UserDetailsAdaptor object based on the given user account and groups (granted authorities).- Parameters:
userAccount
- a valid system user accountgroupNames
- the names of the groups (granted authorities)
-
-
Method Details
-
getAuthorities
Return the list of authorities associated with the user- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- an array containing
invalid reference
GrantedAuthorityAdaptor
- See Also:
-
getPassword
Return the password.- Specified by:
getPassword
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- the password
- See Also:
-
getPasswordSalt
Return the password salt if defined.- Returns:
- the password salt
- See Also:
-
getUsername
Return the user login name or principal.- Specified by:
getUsername
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- the user login name or principal
- See Also:
-
isAccountNonExpired
public boolean isAccountNonExpired()Return whether the account has not yet expired (currently always returns true).- Specified by:
isAccountNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- true if the account has not yet expired
- See Also:
-
isAccountNonLocked
public boolean isAccountNonLocked()Return whether the account has not been locked.- Specified by:
isAccountNonLocked
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- true if the account has not been locked
- See Also:
-
isCredentialsNonExpired
public boolean isCredentialsNonExpired()Return whether the account credentials have not yet expired (currently always returns true)- Specified by:
isCredentialsNonExpired
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- true if the account credentials have not yet expired
- See Also:
-
isEnabled
public boolean isEnabled()Return whether the account is enabled.- Specified by:
isEnabled
in interfaceorg.springframework.security.core.userdetails.UserDetails
- Returns:
- true if the SmartForm Manager account is active
- See Also:
-
getUserAccount
Return the underlying user account.- Returns:
- the underlying user account
-