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
Nested ClassesModifier and TypeClassDescriptionstatic classA builder forAbstractSaml2AuthenticationRequestand its subclasses. -
Method Summary
Modifier and TypeMethodDescriptionReturns the URI endpoint that this AuthNRequest should be sent to.abstract Saml2MessageBindingReturns 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 theRelyingPartyRegistrationassociated 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.REDIRECTthe value is deflated and SAML encoded. IfgetBinding()isSaml2MessageBinding.POSTthe 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 theRelyingPartyRegistrationassociated with this request- Returns:
- the
RelyingPartyRegistrationid - 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.REDIRECTis used, the DEFLATE encoding will be automatically applied.- Returns:
- the binding this message will be sent with.
-