Package com.avoka.fc.core.security
Class SSOAuthenticationToken
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
com.avoka.fc.core.security.SSOAuthenticationToken
- All Implemented Interfaces:
Serializable
,Principal
,org.springframework.security.core.Authentication
,org.springframework.security.core.CredentialsContainer
- Direct Known Subclasses:
SsoAuthToken
public class SSOAuthenticationToken
extends org.springframework.security.authentication.UsernamePasswordAuthenticationToken
Provides an authentication token used for single-sign on (SSO) authentication.
- See Also:
-
UsernamePasswordAuthenticationToken
- Serialized Form
-
Constructor Summary
ConstructorDescriptionSSOAuthenticationToken
(String username) Creates a new SSO Authentication Token for the specified login name.SSOAuthenticationToken
(String username, Collection<org.springframework.security.core.GrantedAuthority> authorities) Creates a new SsoAuthenticationToken for the specified login name and granted authorities (groups).SSOAuthenticationToken
(String username, Map<String, Object> attributes) Creates a new SSO Authentication Token for the specified login name and attributes.Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to. -
Method Summary
Modifier and TypeMethodDescriptionReturn a map of user attributes.Collection<org.springframework.security.core.GrantedAuthority>
Return the list of authorities associated with the user.toString()
Return the string representation of this object.Methods inherited from class org.springframework.security.authentication.UsernamePasswordAuthenticationToken
eraseCredentials, getCredentials, getPrincipal, setAuthenticated
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken
equals, getDetails, getName, hashCode, isAuthenticated, setDetails
-
Constructor Details
-
SSOAuthenticationToken
Creates a new SSO Authentication Token for the specified login name.- Parameters:
username
- the login name- Since:
- 3.6.0
-
SSOAuthenticationToken
Creates a new SSO Authentication Token for the specified login name and attributes.- Parameters:
username
- the login nameattributes
- the user attributes
-
SSOAuthenticationToken
public SSOAuthenticationToken(String username, Collection<org.springframework.security.core.GrantedAuthority> authorities) Creates a new SsoAuthenticationToken for the specified login name and granted authorities (groups).- Parameters:
username
- the login nameauthorities
- the uses set of granted authorities or groups.- Since:
- 3.6.0
-
SSOAuthenticationToken
Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.- Parameters:
username
- the login nameattributes
- the user attributesgroups
- the set of groups the user belongs to, will be marshaled into granted authorities.
-
SSOAuthenticationToken
Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.- Parameters:
username
- the login nameattributes
- the user attributesgroups
- the set of groups the user belongs to, will be marshaled into granted authorities.
-
-
Method Details
-
getAttributes
Return a map of user attributes.- Returns:
- a map of user attributes
-
getAuthorities
Return the list of authorities associated with the user.- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
- Overrides:
getAuthorities
in classorg.springframework.security.authentication.AbstractAuthenticationToken
- Returns:
- an array containing
GrantedAuthorityAdaptor
objects representing SmartForm Manager roles - Since:
- 3.6.0
- See Also:
-
Authentication.getAuthorities()
-
toString
Return the string representation of this object.
-