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.SerializableData holder forAuthNRequestparameters to be sent using either theSaml2MessageBinding.POSTorSaml2MessageBinding.REDIRECTbinding. 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 classAbstractSaml2AuthenticationRequest.Builder<T extends AbstractSaml2AuthenticationRequest.Builder<T>>A builder forAbstractSaml2AuthenticationRequestand its subclasses.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAuthenticationRequestUri()Returns the URI endpoint that this AuthNRequest should be sent to.abstract Saml2MessageBindinggetBinding()Returns the binding this AuthNRequest will be sent and encoded with.java.lang.StringgetRelayState()Returns the RelayState value, if present in the parametersjava.lang.StringgetRelyingPartyRegistrationId()The identifier for theRelyingPartyRegistrationassociated with this requestjava.lang.StringgetSamlRequest()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.REDIRECTthe value is deflated and SAML encoded. IfgetBinding()isSaml2MessageBinding.POSTthe 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 theRelyingPartyRegistrationassociated with this request- Returns:
- the
RelyingPartyRegistrationid - Since:
- 5.8
-
getBinding
public abstract Saml2MessageBinding 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.
-
-