Class AbstractSaml2AuthenticationRequest
java.lang.Object
org.springframework.security.saml2.provider.service.authentication.AbstractSaml2AuthenticationRequest
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Saml2PostAuthenticationRequest
,Saml2RedirectAuthenticationRequest
Data holder for
AuthNRequest
parameters to be sent using either the
Saml2MessageBinding.POST
or Saml2MessageBinding.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)- Since:
- 5.3
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A builder forAbstractSaml2AuthenticationRequest
and its subclasses. -
Method Summary
Modifier and TypeMethodDescriptionReturns the URI endpoint that this AuthNRequest should be sent to.abstract Saml2MessageBinding
Returns the binding this AuthNRequest will be sent and encoded with.getId()
The unique identifier for this Authentication RequestReturns the RelayState value, if present in the parametersThe identifier for theRelyingPartyRegistration
associated with this requestReturns the AuthNRequest XML value to be sent.
-
Method Details
-
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
Returns the RelayState value, if present in the parameters- Returns:
- the RelayState value, or null if not available
-
getAuthenticationRequestUri
Returns the URI endpoint that this AuthNRequest should be sent to.- Returns:
- the URI endpoint for this message
-
getRelyingPartyRegistrationId
The identifier for theRelyingPartyRegistration
associated with this request- Returns:
- the
RelyingPartyRegistration
id - Since:
- 5.8
-
getId
The unique identifier for this Authentication Request- Returns:
- the Authentication Request identifier
- Since:
- 5.8
-
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.
-