Class Saml2AuthenticationRequestContext.Builder
- java.lang.Object
-
- org.springframework.security.saml2.provider.service.authentication.Saml2AuthenticationRequestContext.Builder
-
- Enclosing class:
- Saml2AuthenticationRequestContext
public static final class Saml2AuthenticationRequestContext.Builder extends java.lang.ObjectA builder forSaml2AuthenticationRequestContext.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Saml2AuthenticationRequestContext.BuilderassertionConsumerServiceUrl(java.lang.String assertionConsumerServiceUrl)Sets theassertionConsumerServiceURLfor the authentication request.Saml2AuthenticationRequestContextbuild()Creates aSaml2AuthenticationRequestContextobject.Saml2AuthenticationRequestContext.Builderissuer(java.lang.String issuer)Sets the issuer for the authentication request.Saml2AuthenticationRequestContext.BuilderrelayState(java.lang.String relayState)Sets theRelayStateparameter that will accompany this AuthNRequestSaml2AuthenticationRequestContext.BuilderrelyingPartyRegistration(RelyingPartyRegistration relyingPartyRegistration)Sets theRelyingPartyRegistrationused to build the authentication request.
-
-
-
Method Detail
-
issuer
public Saml2AuthenticationRequestContext.Builder issuer(java.lang.String 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(java.lang.String assertionConsumerServiceUrl)
Sets theassertionConsumerServiceURLfor the authentication request. Typically theService Provider EntityID- Parameters:
assertionConsumerServiceUrl- - a required value- Returns:
- this
Builder
-
relayState
public Saml2AuthenticationRequestContext.Builder relayState(java.lang.String 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
public Saml2AuthenticationRequestContext build()
Creates aSaml2AuthenticationRequestContextobject.- Returns:
- the Saml2AuthenticationRequest object
- Throws:
java.lang.IllegalArgumentException- if a required property is not set
-
-