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.Object
A builder forSaml2AuthenticationRequestContext
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Saml2AuthenticationRequestContext.Builder
assertionConsumerServiceUrl(java.lang.String assertionConsumerServiceUrl)
Sets theassertionConsumerServiceURL
for the authentication request.Saml2AuthenticationRequestContext
build()
Creates aSaml2AuthenticationRequestContext
object.Saml2AuthenticationRequestContext.Builder
issuer(java.lang.String issuer)
Sets the issuer for the authentication request.Saml2AuthenticationRequestContext.Builder
relayState(java.lang.String relayState)
Sets theRelayState
parameter that will accompany this AuthNRequestSaml2AuthenticationRequestContext.Builder
relyingPartyRegistration(RelyingPartyRegistration relyingPartyRegistration)
Sets theRelyingPartyRegistration
used 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 theRelyingPartyRegistration
used to build the authentication request.- Parameters:
relyingPartyRegistration
- - a required value- Returns:
- this
Builder
-
assertionConsumerServiceUrl
public Saml2AuthenticationRequestContext.Builder assertionConsumerServiceUrl(java.lang.String assertionConsumerServiceUrl)
Sets theassertionConsumerServiceURL
for 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 theRelayState
parameter 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 aSaml2AuthenticationRequestContext
object.- Returns:
- the Saml2AuthenticationRequest object
- Throws:
java.lang.IllegalArgumentException
- if a required property is not set
-
-