Class Saml2AuthnRequestProcessorConfigurer
java.lang.Object
se.swedenconnect.spring.saml.idp.config.configurers.Saml2AuthnRequestProcessorConfigurer
A configurer for the processing of SAML2
AuthnRequest
messages.-
Method Summary
Modifier and TypeMethodDescriptionauthenticationProvider
(org.springframework.security.config.Customizer<Saml2AuthnRequestAuthenticationProviderConfigurer> customizer) Customizes theSaml2AuthnRequestAuthenticationProviderConfigurer
that is used to create the default authentication provider -Saml2AuthnRequestAuthenticationProvider
.authenticationSuccessHandler
(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler) Sets theAuthenticationSuccessHandler
used for handling a successful SP (relying party) authentication and associating theSaml2AuthnRequestAuthenticationToken
to theSecurityContext
.authnRequestConverter
(org.springframework.security.web.authentication.AuthenticationConverter authnRequestConverter) Adds anAuthenticationConverter
used when attempting to extract anAuthnRequest
fromHttpServletRequest
to an instance ofSaml2AuthnRequestAuthenticationToken
used for authenticating the request and to process it further.authnRequestConverters
(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> authnRequestConvertersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's allowing the ability to add, remove, or customize a specificAuthenticationConverter
.customAuthenticationProvider
(org.springframework.security.authentication.AuthenticationProvider customAuthenticationProvider) Installs a customAuthenticationProvider
to be used instead ofSaml2AuthnRequestAuthenticationProvider
.protected final org.springframework.security.config.annotation.ObjectPostProcessor
<Object> Gets the object post processor.protected void
init
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) protected final <T> T
postProcess
(T object) Post processes the supplied object.
-
Method Details
-
authnRequestConverter
public Saml2AuthnRequestProcessorConfigurer authnRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter authnRequestConverter) Adds anAuthenticationConverter
used when attempting to extract anAuthnRequest
fromHttpServletRequest
to an instance ofSaml2AuthnRequestAuthenticationToken
used for authenticating the request and to process it further.- Parameters:
authnRequestConverter
- anAuthenticationConverter
used when attempting to extract anAuthnRequest
fromHttpServletRequest
- Returns:
- the
Saml2AuthnRequestProcessorConfigurer
for further configuration
-
authnRequestConverters
public Saml2AuthnRequestProcessorConfigurer authnRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> authnRequestConvertersConsumer) Sets theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's allowing the ability to add, remove, or customize a specificAuthenticationConverter
.- Parameters:
authnRequestConvertersConsumer
- theConsumer
providing access to theList
of default and (optionally) addedAuthenticationConverter
's- Returns:
- the
Saml2AuthnRequestProcessorConfigurer
for further configuration
-
authenticationProvider
public Saml2AuthnRequestProcessorConfigurer authenticationProvider(org.springframework.security.config.Customizer<Saml2AuthnRequestAuthenticationProviderConfigurer> customizer) Customizes theSaml2AuthnRequestAuthenticationProviderConfigurer
that is used to create the default authentication provider -Saml2AuthnRequestAuthenticationProvider
.- Parameters:
customizer
- the customizer that is given access to theSaml2AuthnRequestAuthenticationProviderConfigurer
- Returns:
- the
Saml2AuthnRequestProcessorConfigurer
for further configuration
-
customAuthenticationProvider
public Saml2AuthnRequestProcessorConfigurer customAuthenticationProvider(org.springframework.security.authentication.AuthenticationProvider customAuthenticationProvider) Installs a customAuthenticationProvider
to be used instead ofSaml2AuthnRequestAuthenticationProvider
.- Parameters:
customAuthenticationProvider
- anAuthenticationProvider
used for authenticating anSaml2AuthnRequestAuthenticationToken
- Returns:
- the
Saml2AuthnRequestProcessorConfigurer
for further configuration
-
authenticationSuccessHandler
public Saml2AuthnRequestProcessorConfigurer authenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler) Sets theAuthenticationSuccessHandler
used for handling a successful SP (relying party) authentication and associating theSaml2AuthnRequestAuthenticationToken
to theSecurityContext
.- Parameters:
authenticationSuccessHandler
- theAuthenticationSuccessHandler
used for handling a successful SP authentication- Returns:
- the
Saml2AuthnRequestProcessorConfigurer
for further configuration
-
init
protected void init(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) -
postProcess
protected final <T> T postProcess(T object) Post processes the supplied object.- Type Parameters:
T
- the type- Parameters:
object
- the object to process- Returns:
- the processed object
-
getObjectPostProcessor
protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> getObjectPostProcessor()Gets the object post processor.- Returns:
- the object post processor
-