public class Saml2AuthenticationToken extends AbstractAuthenticationToken
isAuthenticated()
will always return false.Constructor and Description |
---|
Saml2AuthenticationToken(RelyingPartyRegistration relyingPartyRegistration,
java.lang.String saml2Response)
Creates a
Saml2AuthenticationToken with the provided parameters
Note that the given RelyingPartyRegistration should have all its templates
resolved at this point. |
Saml2AuthenticationToken(java.lang.String saml2Response,
java.lang.String recipientUri,
java.lang.String idpEntityId,
java.lang.String localSpEntityId,
java.util.List<Saml2X509Credential> credentials)
Deprecated.
|
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()
Deprecated.
Use
getRelyingPartyRegistration().getAssertingPartyDetails().getEntityId()
instead |
java.lang.String |
getLocalSpEntityId()
Deprecated.
Use
getRelyingPartyRegistration().getEntityId() instead |
java.lang.Object |
getPrincipal()
Always returns null.
|
java.lang.String |
getRecipientUri()
Deprecated.
Use
getRelyingPartyRegistration().getAssertionConsumerServiceLocation() instead |
RelyingPartyRegistration |
getRelyingPartyRegistration()
Get the resolved
RelyingPartyRegistration associated with the request |
java.lang.String |
getSaml2Response()
Returns inflated and decoded XML representation of the SAML 2 Response
|
java.util.List<Saml2X509Credential> |
getX509Credentials()
Deprecated.
Get the credentials through
getRelyingPartyRegistration()
instead |
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(RelyingPartyRegistration relyingPartyRegistration, java.lang.String saml2Response)
Saml2AuthenticationToken
with the provided parameters
Note that the given RelyingPartyRegistration
should have all its templates
resolved at this point. See
Saml2WebSsoAuthenticationFilter
for an example of performing that resolution.relyingPartyRegistration
- the resolved RelyingPartyRegistration
to
usesaml2Response
- the SAML 2.0 response to authenticate@Deprecated public Saml2AuthenticationToken(java.lang.String saml2Response, java.lang.String recipientUri, java.lang.String idpEntityId, java.lang.String localSpEntityId, java.util.List<Saml2X509Credential> credentials)
Saml2AuthenticationToken(RelyingPartyRegistration, String)
insteadsaml2Response
- 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 RelyingPartyRegistration getRelyingPartyRegistration()
RelyingPartyRegistration
associated with the requestRelyingPartyRegistration
public java.lang.String getSaml2Response()
@Deprecated public java.lang.String getRecipientUri()
getRelyingPartyRegistration().getAssertionConsumerServiceLocation()
instead@Deprecated public java.lang.String getLocalSpEntityId()
getRelyingPartyRegistration().getEntityId()
instead@Deprecated public java.util.List<Saml2X509Credential> getX509Credentials()
getRelyingPartyRegistration()
insteadpublic 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@Deprecated public java.lang.String getIdpEntityId()
getRelyingPartyRegistration().getAssertingPartyDetails().getEntityId()
instead