Class Saml2UserAuthenticationConfigurer
java.lang.Object
se.swedenconnect.spring.saml.idp.config.configurers.Saml2UserAuthenticationConfigurer
A configurer for handling user authentication and issuance of SAML
Assertions.- Author:
- Martin Lindström
-
Method Summary
Modifier and TypeMethodDescriptionassertionCustomizer(org.springframework.security.config.Customizer<Assertion> assertionCustomizer) By assigning aCustomizertheAssertionobject that is built can be modified.attributeProducers(org.springframework.security.config.Customizer<List<AttributeProducer>> customizer) Customizes the list ofAttributeProducers that will later be installed to theAttributeReleaseManagerand SAML attribute builder.attributeReleaseVoters(org.springframework.security.config.Customizer<List<AttributeReleaseVoter>> customizer) Customizes the list ofAttributeReleaseVoters that will later be installed to theAttributeReleaseManagerand SAML attribute builder.authenticationTokenRepository(FilterAuthenticationTokenRepository authenticationTokenRepository) Assigns aFilterAuthenticationTokenRepositoryinstance for storingAuthenticationobjects when external authentication is used.protected final org.springframework.security.config.annotation.ObjectPostProcessor<Object> Gets the object post processor.idGenerator(Saml2MessageIDGenerator idGenerator) Assigns a customSaml2MessageIDGeneratorto be used by the assertion builder.protected voidinit(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) postAuthenticationProcessors(org.springframework.security.config.Customizer<List<PostAuthenticationProcessor>> customizer) Customizes the list ofPostAuthenticationProcessors.protected final <T> TpostProcess(T object) Post processes the supplied object.resumeAuthnPath(String path)
-
Method Details
-
resumeAuthnPath
-
authenticationTokenRepository
public Saml2UserAuthenticationConfigurer authenticationTokenRepository(FilterAuthenticationTokenRepository authenticationTokenRepository) Assigns aFilterAuthenticationTokenRepositoryinstance for storingAuthenticationobjects when external authentication is used. The default isSessionBasedExternalAuthenticationRepository.Note: Ensure that the
ExternalAuthenticatorTokenRepositoryassigned to theAbstractUserRedirectAuthenticationProvideris using the same persistence strategy as the assigned repository bean.- Parameters:
authenticationTokenRepository- the repository to use- Returns:
- the
Saml2UserAuthenticationConfigurerfor further configuration
-
assertionCustomizer
public Saml2UserAuthenticationConfigurer assertionCustomizer(org.springframework.security.config.Customizer<Assertion> assertionCustomizer) By assigning aCustomizertheAssertionobject that is built can be modified. The customizer is invoked when theAssertionobject has been completely built, but before it is signed.- Parameters:
assertionCustomizer- aCustomizer- Returns:
- the
Saml2UserAuthenticationConfigurerfor further configuration
-
idGenerator
Assigns a customSaml2MessageIDGeneratorto be used by the assertion builder.- Parameters:
idGenerator- theSaml2MessageIDGenerator- Returns:
- the
Saml2UserAuthenticationConfigurerfor further configuration
-
attributeProducers
public Saml2UserAuthenticationConfigurer attributeProducers(org.springframework.security.config.Customizer<List<AttributeProducer>> customizer) Customizes the list ofAttributeProducers that will later be installed to theAttributeReleaseManagerand SAML attribute builder.- Parameters:
customizer- aCustomizer- Returns:
- the
Saml2UserAuthenticationConfigurerfor further configuration
-
attributeReleaseVoters
public Saml2UserAuthenticationConfigurer attributeReleaseVoters(org.springframework.security.config.Customizer<List<AttributeReleaseVoter>> customizer) Customizes the list ofAttributeReleaseVoters that will later be installed to theAttributeReleaseManagerand SAML attribute builder.- Parameters:
customizer- aCustomizer- Returns:
- the
Saml2UserAuthenticationConfigurerfor further configuration
-
postAuthenticationProcessors
public Saml2UserAuthenticationConfigurer postAuthenticationProcessors(org.springframework.security.config.Customizer<List<PostAuthenticationProcessor>> customizer) Customizes the list ofPostAuthenticationProcessors.- Parameters:
customizer- aCustomizer- Returns:
- the
Saml2UserAuthenticationConfigurerfor 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
-