Class OpenSamlAuthenticationRequestFactory
- java.lang.Object
-
- org.springframework.security.saml2.provider.service.authentication.OpenSamlAuthenticationRequestFactory
-
- All Implemented Interfaces:
Saml2AuthenticationRequestFactory
public class OpenSamlAuthenticationRequestFactory extends java.lang.Object implements Saml2AuthenticationRequestFactory
- Since:
- 5.2
-
-
Constructor Summary
Constructors Constructor Description OpenSamlAuthenticationRequestFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createAuthenticationRequest(Saml2AuthenticationRequest request)
Creates an authentication request from the Service Provider, sp, to the Identity Provider, idp.void
setClock(java.time.Clock clock)
' Use thisClock
withInstant.now()
for generating timestampsvoid
setProtocolBinding(java.lang.String protocolBinding)
Sets theprotocolBinding
to use when generating authentication requests Acceptable values areSAMLConstants.SAML2_POST_BINDING_URI
andSAMLConstants.SAML2_REDIRECT_BINDING_URI
-
-
-
Method Detail
-
createAuthenticationRequest
public java.lang.String createAuthenticationRequest(Saml2AuthenticationRequest request)
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.- Specified by:
createAuthenticationRequest
in 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 or neither signed and encrypted
-
setClock
public void setClock(java.time.Clock clock)
' Use thisClock
withInstant.now()
for generating timestamps- Parameters:
clock
-
-
setProtocolBinding
public void setProtocolBinding(java.lang.String protocolBinding)
Sets theprotocolBinding
to use when generating authentication requests Acceptable values areSAMLConstants.SAML2_POST_BINDING_URI
andSAMLConstants.SAML2_REDIRECT_BINDING_URI
- Parameters:
protocolBinding
-- Throws:
java.lang.IllegalArgumentException
- if the protocolBinding is not valid
-
-