Class AbstractSaml2AuthenticationRequest
- java.lang.Object
-
- org.springframework.security.saml2.provider.service.authentication.AbstractSaml2AuthenticationRequest
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
Saml2PostAuthenticationRequest
,Saml2RedirectAuthenticationRequest
public abstract class AbstractSaml2AuthenticationRequest extends java.lang.Object implements java.io.Serializable
Data holder forAuthNRequest
parameters to be sent using either theSaml2MessageBinding.POST
orSaml2MessageBinding.REDIRECT
binding. Data will be encoded and possibly deflated, but will not be escaped for transport, ie URL encoded,UriUtils.encode(String, Charset)
or HTML encoded,HtmlUtils.htmlEscape(String)
. https://www.oasis-open.org/committees/download.php/35711/sstc-saml-core-errata-2.0-wd-06-diff.pdf (line 2031)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractSaml2AuthenticationRequest.Builder<T extends AbstractSaml2AuthenticationRequest.Builder<T>>
A builder forAbstractSaml2AuthenticationRequest
and its subclasses.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAuthenticationRequestUri()
Returns the URI endpoint that this AuthNRequest should be sent to.abstract Saml2MessageBinding
getBinding()
Returns the binding this AuthNRequest will be sent and encoded with.java.lang.String
getRelayState()
Returns the RelayState value, if present in the parametersjava.lang.String
getRelyingPartyRegistrationId()
The identifier for theRelyingPartyRegistration
associated with this requestjava.lang.String
getSamlRequest()
Returns the AuthNRequest XML value to be sent.
-
-
-
Method Detail
-
getSamlRequest
public java.lang.String getSamlRequest()
Returns the AuthNRequest XML value to be sent. This value is already encoded for transport. IfgetBinding()
isSaml2MessageBinding.REDIRECT
the value is deflated and SAML encoded. IfgetBinding()
isSaml2MessageBinding.POST
the value is SAML encoded.- Returns:
- the SAMLRequest parameter value
-
getRelayState
public java.lang.String getRelayState()
Returns the RelayState value, if present in the parameters- Returns:
- the RelayState value, or null if not available
-
getAuthenticationRequestUri
public java.lang.String getAuthenticationRequestUri()
Returns the URI endpoint that this AuthNRequest should be sent to.- Returns:
- the URI endpoint for this message
-
getRelyingPartyRegistrationId
public java.lang.String getRelyingPartyRegistrationId()
The identifier for theRelyingPartyRegistration
associated with this request- Returns:
- the
RelyingPartyRegistration
id - Since:
- 5.8
-
getBinding
public abstract Saml2MessageBinding getBinding()
Returns the binding this AuthNRequest will be sent and encoded with. IfSaml2MessageBinding.REDIRECT
is used, the DEFLATE encoding will be automatically applied.- Returns:
- the binding this message will be sent with.
-
-