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 theSaml2AuthnRequestAuthenticationProviderConfigurerthat is used to create the default authentication provider -Saml2AuthnRequestAuthenticationProvider.authenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler) Sets theAuthenticationSuccessHandlerused for handling a successful SP (relying party) authentication and associating theSaml2AuthnRequestAuthenticationTokento theSecurityContext.authnRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter authnRequestConverter) Adds anAuthenticationConverterused when attempting to extract anAuthnRequestfromHttpServletRequestto an instance ofSaml2AuthnRequestAuthenticationTokenused for authenticating the request and to process it further.authnRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> authnRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.customAuthenticationProvider(org.springframework.security.authentication.AuthenticationProvider customAuthenticationProvider) Installs a customAuthenticationProviderto be used instead ofSaml2AuthnRequestAuthenticationProvider.protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> Gets the object post processor.protected voidinit(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) protected final <T> TpostProcess(T object) Post processes the supplied object.
-
Method Details
-
authnRequestConverter
public Saml2AuthnRequestProcessorConfigurer authnRequestConverter(org.springframework.security.web.authentication.AuthenticationConverter authnRequestConverter) Adds anAuthenticationConverterused when attempting to extract anAuthnRequestfromHttpServletRequestto an instance ofSaml2AuthnRequestAuthenticationTokenused for authenticating the request and to process it further.- Parameters:
authnRequestConverter- anAuthenticationConverterused when attempting to extract anAuthnRequestfromHttpServletRequest- Returns:
- the
Saml2AuthnRequestProcessorConfigurerfor further configuration
-
authnRequestConverters
public Saml2AuthnRequestProcessorConfigurer authnRequestConverters(Consumer<List<org.springframework.security.web.authentication.AuthenticationConverter>> authnRequestConvertersConsumer) Sets theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's allowing the ability to add, remove, or customize a specificAuthenticationConverter.- Parameters:
authnRequestConvertersConsumer- theConsumerproviding access to theListof default and (optionally) addedAuthenticationConverter's- Returns:
- the
Saml2AuthnRequestProcessorConfigurerfor further configuration
-
authenticationProvider
public Saml2AuthnRequestProcessorConfigurer authenticationProvider(org.springframework.security.config.Customizer<Saml2AuthnRequestAuthenticationProviderConfigurer> customizer) Customizes theSaml2AuthnRequestAuthenticationProviderConfigurerthat is used to create the default authentication provider -Saml2AuthnRequestAuthenticationProvider.- Parameters:
customizer- the customizer that is given access to theSaml2AuthnRequestAuthenticationProviderConfigurer- Returns:
- the
Saml2AuthnRequestProcessorConfigurerfor further configuration
-
customAuthenticationProvider
public Saml2AuthnRequestProcessorConfigurer customAuthenticationProvider(org.springframework.security.authentication.AuthenticationProvider customAuthenticationProvider) Installs a customAuthenticationProviderto be used instead ofSaml2AuthnRequestAuthenticationProvider.- Parameters:
customAuthenticationProvider- anAuthenticationProviderused for authenticating anSaml2AuthnRequestAuthenticationToken- Returns:
- the
Saml2AuthnRequestProcessorConfigurerfor further configuration
-
authenticationSuccessHandler
public Saml2AuthnRequestProcessorConfigurer authenticationSuccessHandler(org.springframework.security.web.authentication.AuthenticationSuccessHandler authenticationSuccessHandler) Sets theAuthenticationSuccessHandlerused for handling a successful SP (relying party) authentication and associating theSaml2AuthnRequestAuthenticationTokento theSecurityContext.- Parameters:
authenticationSuccessHandler- theAuthenticationSuccessHandlerused for handling a successful SP authentication- Returns:
- the
Saml2AuthnRequestProcessorConfigurerfor 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
-