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
Constructors Constructor Description SSOAuthenticationToken(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.SSOAuthenticationToken(String username, Map<String,Object> attributes, List<String> groups)
Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.SSOAuthenticationToken(String username, Map<String,Object> attributes, Set<String> groups)
Creates a new SsoAuthenticationToken for the specified login name, attributes and groups the user belongs to.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>
getAttributes()
Return a map of user attributes.Collection<org.springframework.security.core.GrantedAuthority>
getAuthorities()
Return the list of authorities associated with the user.String
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 Detail
-
SSOAuthenticationToken
public SSOAuthenticationToken(String username)
Creates a new SSO Authentication Token for the specified login name.- Parameters:
username
- the login name- Since:
- 3.6.0
-
SSOAuthenticationToken
public SSOAuthenticationToken(String username, Map<String,Object> attributes)
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
public SSOAuthenticationToken(String username, Map<String,Object> attributes, Set<String> groups)
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
public SSOAuthenticationToken(String username, Map<String,Object> attributes, List<String> groups)
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 Detail
-
getAttributes
public Map<String,Object> getAttributes()
Return a map of user attributes.- Returns:
- a map of user attributes
-
getAuthorities
public Collection<org.springframework.security.core.GrantedAuthority> 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()
-
-