public class CrowdSSOAuthenticationToken
extends org.springframework.security.authentication.AbstractAuthenticationToken
It can also be used to represent a token for successful authentication consisting of the CrowdUserDetails (principal), the Crowd SSO Token String (credential) and a collection of Group names the authenticated user is a member of (GrantedAuthorities).
| Constructor and Description |
|---|
CrowdSSOAuthenticationToken(String ssoToken)
Use constructor to create an unauthenticated SSO token.
|
CrowdSSOAuthenticationToken(org.springframework.security.core.userdetails.UserDetails principal,
String ssoToken,
Collection<org.springframework.security.core.GrantedAuthority> authorities) |
CrowdSSOAuthenticationToken(org.springframework.security.core.userdetails.UserDetails principal,
String ssoToken,
org.springframework.security.core.GrantedAuthority[] authorities)
Use this constructor to create an authenticated SSO token.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getCredentials()
The credentials that prove the principal is correct.
|
Object |
getPrincipal()
The identity of the principal being authenticated.
|
void |
setAuthenticated(boolean isAuthenticated)
Disallow setAuthenticated(true).
|
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toStringpublic CrowdSSOAuthenticationToken(String ssoToken)
ssoToken - token string.public CrowdSSOAuthenticationToken(org.springframework.security.core.userdetails.UserDetails principal,
String ssoToken,
org.springframework.security.core.GrantedAuthority[] authorities)
This should only be used by the AuthenticationProvider.
principal - authenticated user.ssoToken - authenticated SSO token as credential.authorities - granted authorities.public CrowdSSOAuthenticationToken(org.springframework.security.core.userdetails.UserDetails principal,
String ssoToken,
Collection<org.springframework.security.core.GrantedAuthority> authorities)
public Object getCredentials()
AuthenticationManager. Callers are expected to populate the credentials.Principalpublic Object getPrincipal()
Principal being authenticatedpublic void setAuthenticated(boolean isAuthenticated)
throws IllegalArgumentException
Use constructor containing GrantedAuthority[]s instead.
setAuthenticated in interface org.springframework.security.core.AuthenticationsetAuthenticated in class org.springframework.security.authentication.AbstractAuthenticationTokenisAuthenticated - must be false.IllegalArgumentException - throwd if isAuthenticated paramater is set to true.Copyright © 2021 Atlassian. All rights reserved.