public class Saml2Authentication extends AbstractAuthenticationToken
AbstractAuthenticationToken
that represents an authenticated SAML 2.0 Authentication
.
The Authentication
associates valid SAML assertion
data with a Spring Security authentication object
The complete assertion is contained in the object in String format,
getSaml2Response()
AbstractAuthenticationToken
,
Serialized FormConstructor and Description |
---|
Saml2Authentication(AuthenticatedPrincipal principal,
java.lang.String saml2Response,
java.util.Collection<? extends GrantedAuthority> authorities) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCredentials()
The credentials that prove the principal is correct.
|
java.lang.Object |
getPrincipal()
The identity of the principal being authenticated.
|
java.lang.String |
getSaml2Response()
Returns the SAML response object, as decoded XML.
|
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setAuthenticated, setDetails, toString
public Saml2Authentication(AuthenticatedPrincipal principal, java.lang.String saml2Response, java.util.Collection<? extends GrantedAuthority> authorities)
public java.lang.Object getPrincipal()
Authentication
The AuthenticationManager implementation will often return an
Authentication containing richer information as the principal for use by
the application. Many of the authentication providers will create a
UserDetails
object as the principal.
Principal
being authenticated or the authenticated
principal after authentication.public java.lang.String getSaml2Response()
public java.lang.Object getCredentials()
Authentication
AuthenticationManager
. Callers
are expected to populate the credentials.Principal