Class OpenSaml4AuthenticationRequestFactory
- java.lang.Object
-
- org.springframework.security.saml2.provider.service.authentication.OpenSaml4AuthenticationRequestFactory
-
- All Implemented Interfaces:
Saml2AuthenticationRequestFactory
@Deprecated public final class OpenSaml4AuthenticationRequestFactory extends java.lang.Object implements Saml2AuthenticationRequestFactory
Deprecated.UseOpenSaml4AuthenticationRequestResolverinsteadASaml2AuthenticationRequestFactorythat generates, signs, and serializes a SAML 2.0 AuthnRequest using OpenSAML 4- Since:
- 5.5
-
-
Constructor Summary
Constructors Constructor Description OpenSaml4AuthenticationRequestFactory()Deprecated.Creates anOpenSaml4AuthenticationRequestFactory
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringcreateAuthenticationRequest(Saml2AuthenticationRequest request)Deprecated.Saml2PostAuthenticationRequestcreatePostAuthenticationRequest(Saml2AuthenticationRequestContext context)Deprecated.Creates all the necessary AuthNRequest parameters for a POST binding.Saml2RedirectAuthenticationRequestcreateRedirectAuthenticationRequest(Saml2AuthenticationRequestContext context)Deprecated.Creates all the necessary AuthNRequest parameters for a REDIRECT binding.voidsetAuthenticationRequestContextConverter(org.springframework.core.convert.converter.Converter<Saml2AuthenticationRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> authenticationRequestContextConverter)Deprecated.Set the strategy for building anAuthnRequestfrom a given contextvoidsetClock(java.time.Clock clock)Deprecated.Use thisClockwithInstant.now()for generating timestamps
-
-
-
Constructor Detail
-
OpenSaml4AuthenticationRequestFactory
public OpenSaml4AuthenticationRequestFactory()
Deprecated.Creates anOpenSaml4AuthenticationRequestFactory
-
-
Method Detail
-
createAuthenticationRequest
@Deprecated public java.lang.String createAuthenticationRequest(Saml2AuthenticationRequest request)
Deprecated.Creates an authentication request from the Service Provider, sp, to the Identity Provider, idp. The authentication result is an XML string that may be signed, encrypted, both or neither. This method only returns theSAMLRequeststring for the request, and for a complete set of data parameters please useSaml2AuthenticationRequestFactory.createRedirectAuthenticationRequest(Saml2AuthenticationRequestContext)orSaml2AuthenticationRequestFactory.createPostAuthenticationRequest(Saml2AuthenticationRequestContext)- Specified by:
createAuthenticationRequestin interfaceSaml2AuthenticationRequestFactory- Parameters:
request- information about the identity provider, the recipient of this authentication request and accompanying data- Returns:
- XML data in the format of a String. This data may be signed, encrypted, both signed and encrypted with the signature embedded in the XML or neither signed and encrypted
-
createPostAuthenticationRequest
public Saml2PostAuthenticationRequest createPostAuthenticationRequest(Saml2AuthenticationRequestContext context)
Deprecated.Creates all the necessary AuthNRequest parameters for a POST binding. If theSaml2AuthenticationRequestContextdoesn't contain anySaml2X509Credential.Saml2X509CredentialType.SIGNINGcredentials the result will not contain any signatures. The data set will be signed and encoded for POST binding and if applicable signed with XML signatures. will contain the following parameters to be sent as part of the form data:SAMLRequest, RelayState. The default implementation of this method returns the SAMLRequest message with an XML signature embedded, that should only be used for theSaml2MessageBinding.POSTbinding.- Specified by:
createPostAuthenticationRequestin interfaceSaml2AuthenticationRequestFactory- Parameters:
context- - information about the identity provider, the recipient of this authentication request and accompanying data- Returns:
- a
Saml2PostAuthenticationRequestobject with applicable http parameters necessary to make the AuthNRequest over a POST binding. All parameters will be SAML encoded but not escaped for Form Data.
-
createRedirectAuthenticationRequest
public Saml2RedirectAuthenticationRequest createRedirectAuthenticationRequest(Saml2AuthenticationRequestContext context)
Deprecated.Creates all the necessary AuthNRequest parameters for a REDIRECT binding. If theSaml2AuthenticationRequestContextdoesn't contain anySaml2X509Credential.Saml2X509CredentialType.SIGNINGcredentials the result will not contain any signatures. The data set will be signed and encoded for REDIRECT binding including the DEFLATE encoding. It will contain the following parameters to be sent as part of the query string:SAMLRequest, RelayState, SigAlg, Signature. The default implementation, for sake of backwards compatibility, of this method returns the SAMLRequest message with an XML signature embedded, that should only be used for theSaml2MessageBinding.POSTbinding, but works overSaml2MessageBinding.POSTwith most providers.- Specified by:
createRedirectAuthenticationRequestin interfaceSaml2AuthenticationRequestFactory- Parameters:
context- - information about the identity provider, the recipient of this authentication request and accompanying data- Returns:
- a
Saml2RedirectAuthenticationRequestobject with applicable http parameters necessary to make the AuthNRequest over a POST or REDIRECT binding. All parameters will be SAML encoded/deflated, but escaped, ie URI encoded or encoded for Form Data.
-
setAuthenticationRequestContextConverter
public void setAuthenticationRequestContextConverter(org.springframework.core.convert.converter.Converter<Saml2AuthenticationRequestContext,org.opensaml.saml.saml2.core.AuthnRequest> authenticationRequestContextConverter)
Deprecated.Set the strategy for building anAuthnRequestfrom a given context- Parameters:
authenticationRequestContextConverter- the conversion strategy to use
-
setClock
public void setClock(java.time.Clock clock)
Deprecated.Use thisClockwithInstant.now()for generating timestamps- Parameters:
clock- theClockto use
-
-