public class Saml2AuthenticationToken extends AbstractAuthenticationToken
isAuthenticated()
will always return false.Constructor and Description |
---|
Saml2AuthenticationToken(java.lang.String saml2Response,
java.lang.String recipientUri,
java.lang.String idpEntityId,
java.lang.String localSpEntityId,
java.util.List<Saml2X509Credential> credentials)
Creates an authentication token from an incoming SAML 2 Response object
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getCredentials()
Returns the decoded and inflated SAML 2.0 Response XML object as a string
|
java.lang.String |
getIdpEntityId()
Returns the configured IDP, asserting party, entity ID
|
java.lang.String |
getLocalSpEntityId()
Returns the configured entity ID of the receiving relying party, SP
|
java.lang.Object |
getPrincipal()
Always returns null.
|
java.lang.String |
getRecipientUri()
Returns the URI that the SAML 2 Response object came in on
|
java.lang.String |
getSaml2Response()
Returns inflated and decoded XML representation of the SAML 2 Response
|
java.util.List<Saml2X509Credential> |
getX509Credentials()
Returns all the credentials associated with the relying party configuraiton
|
boolean |
isAuthenticated()
Used to indicate to
AbstractSecurityInterceptor whether it should present
the authentication token to the AuthenticationManager . |
void |
setAuthenticated(boolean authenticated)
The state of this object cannot be changed.
|
equals, eraseCredentials, getAuthorities, getDetails, getName, hashCode, setDetails, toString
public Saml2AuthenticationToken(java.lang.String saml2Response, java.lang.String recipientUri, java.lang.String idpEntityId, java.lang.String localSpEntityId, java.util.List<Saml2X509Credential> credentials)
saml2Response
- inflated and decoded XML representation of the SAML 2 ResponserecipientUri
- the URL that the SAML 2 Response was received at. Used for validationidpEntityId
- the entity ID of the asserting entitylocalSpEntityId
- the configured local SP, the relying party, entity IDcredentials
- the credentials configured for signature verification and decryptionpublic java.lang.Object getCredentials()
String
public java.lang.Object getPrincipal()
public java.lang.String getSaml2Response()
public java.lang.String getRecipientUri()
public java.lang.String getLocalSpEntityId()
public java.util.List<Saml2X509Credential> getX509Credentials()
public boolean isAuthenticated()
Authentication
AbstractSecurityInterceptor
whether it should present
the authentication token to the AuthenticationManager
. Typically an
AuthenticationManager
(or, more often, one of its
AuthenticationProvider
s) will return an immutable authentication token
after successful authentication, in which case that token can safely return
true
to this method. Returning true
will improve
performance, as calling the AuthenticationManager
for every request
will no longer be necessary.
For security reasons, implementations of this interface should be very careful
about returning true
from this method unless they are either
immutable, or have some way of ensuring the properties have not been changed since
original creation.
isAuthenticated
in interface Authentication
isAuthenticated
in class AbstractAuthenticationToken
public void setAuthenticated(boolean authenticated)
setAuthenticated
in interface Authentication
setAuthenticated
in class AbstractAuthenticationToken
authenticated
- ignored{@link
- IllegalArgumentException}public java.lang.String getIdpEntityId()