Class Saml2AuthenticationRequestContext.Builder
java.lang.Object
org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticationRequestContext.Builder
- Enclosing class:
- Saml2AuthenticationRequestContext
A builder for
Saml2AuthenticationRequestContext.-
Method Summary
Modifier and TypeMethodDescriptionassertionConsumerServiceUrl(String assertionConsumerServiceUrl) Sets theassertionConsumerServiceURLfor the authentication request.build()Creates aSaml2AuthenticationRequestContextobject.Sets the issuer for the authentication request.relayState(String relayState) Sets theRelayStateparameter that will accompany this AuthNRequestrelyingPartyRegistration(RelyingPartyRegistration relyingPartyRegistration) Sets theRelyingPartyRegistrationused to build the authentication request.
-
Method Details
-
issuer
Sets the issuer for the authentication request.- Parameters:
issuer- - a required value- Returns:
- this
Builder
-
relyingPartyRegistration
public Saml2AuthenticationRequestContext.Builder relyingPartyRegistration(RelyingPartyRegistration relyingPartyRegistration) Sets theRelyingPartyRegistrationused to build the authentication request.- Parameters:
relyingPartyRegistration- - a required value- Returns:
- this
Builder
-
assertionConsumerServiceUrl
public Saml2AuthenticationRequestContext.Builder assertionConsumerServiceUrl(String assertionConsumerServiceUrl) Sets theassertionConsumerServiceURLfor the authentication request. Typically theService Provider EntityID- Parameters:
assertionConsumerServiceUrl- - a required value- Returns:
- this
Builder
-
relayState
Sets theRelayStateparameter that will accompany this AuthNRequest- Parameters:
relayState- the relay state value, unencoded. if null or empty, the parameter will be removed from the map.- Returns:
- this object
-
build
Creates aSaml2AuthenticationRequestContextobject.- Returns:
- the Saml2AuthenticationRequest object
- Throws:
IllegalArgumentException- if a required property is not set
-