Class Saml2UserAuthenticationConfigurer
java.lang.Object
se.swedenconnect.spring.saml.idp.config.configurers.Saml2UserAuthenticationConfigurer
A configurer for handling user authentication and issuance of SAML
Assertion
s.- Author:
- Martin Lindström
-
Method Summary
Modifier and TypeMethodDescriptionassertionCustomizer
(org.springframework.security.config.Customizer<org.opensaml.saml.saml2.core.Assertion> assertionCustomizer) By assigning aCustomizer
theAssertion
object that is built can be modified.attributeProducers
(org.springframework.security.config.Customizer<List<AttributeProducer>> customizer) Customizes the list ofAttributeProducer
s that will later be installed to theAttributeReleaseManager
and SAML attribute builder.attributeReleaseVoters
(org.springframework.security.config.Customizer<List<AttributeReleaseVoter>> customizer) Customizes the list ofAttributeReleaseVoter
s that will later be installed to theAttributeReleaseManager
and SAML attribute builder.authenticationTokenRepository
(FilterAuthenticationTokenRepository authenticationTokenRepository) Assigns aFilterAuthenticationTokenRepository
instance for storingAuthentication
objects when external authentication is used.protected final org.springframework.security.config.annotation.ObjectPostProcessor
<Object> Gets the object post processor.idGenerator
(Saml2MessageIDGenerator idGenerator) Assigns a customSaml2MessageIDGenerator
to be used by the assertion builder.protected void
init
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) postAuthenticationProcessors
(org.springframework.security.config.Customizer<List<PostAuthenticationProcessor>> customizer) Customizes the list ofPostAuthenticationProcessor
s.protected final <T> T
postProcess
(T object) Post processes the supplied object.resumeAuthnPath
(String path)
-
Method Details
-
resumeAuthnPath
-
authenticationTokenRepository
public Saml2UserAuthenticationConfigurer authenticationTokenRepository(FilterAuthenticationTokenRepository authenticationTokenRepository) Assigns aFilterAuthenticationTokenRepository
instance for storingAuthentication
objects when external authentication is used. The default isSessionBasedExternalAuthenticationRepository
.Note: Ensure that the
ExternalAuthenticatorTokenRepository
assigned to theAbstractUserRedirectAuthenticationProvider
is using the same persistence strategy as the assigned repository bean.- Parameters:
authenticationTokenRepository
- the repository to use- Returns:
- the
Saml2UserAuthenticationConfigurer
for further configuration
-
assertionCustomizer
public Saml2UserAuthenticationConfigurer assertionCustomizer(org.springframework.security.config.Customizer<org.opensaml.saml.saml2.core.Assertion> assertionCustomizer) By assigning aCustomizer
theAssertion
object that is built can be modified. The customizer is invoked when theAssertion
object has been completely built, but before it is signed.- Parameters:
assertionCustomizer
- aCustomizer
- Returns:
- the
Saml2UserAuthenticationConfigurer
for further configuration
-
idGenerator
Assigns a customSaml2MessageIDGenerator
to be used by the assertion builder.- Parameters:
idGenerator
- theSaml2MessageIDGenerator
- Returns:
- the
Saml2UserAuthenticationConfigurer
for further configuration
-
attributeProducers
public Saml2UserAuthenticationConfigurer attributeProducers(org.springframework.security.config.Customizer<List<AttributeProducer>> customizer) Customizes the list ofAttributeProducer
s that will later be installed to theAttributeReleaseManager
and SAML attribute builder.- Parameters:
customizer
- aCustomizer
- Returns:
- the
Saml2UserAuthenticationConfigurer
for further configuration
-
attributeReleaseVoters
public Saml2UserAuthenticationConfigurer attributeReleaseVoters(org.springframework.security.config.Customizer<List<AttributeReleaseVoter>> customizer) Customizes the list ofAttributeReleaseVoter
s that will later be installed to theAttributeReleaseManager
and SAML attribute builder.- Parameters:
customizer
- aCustomizer
- Returns:
- the
Saml2UserAuthenticationConfigurer
for further configuration
-
postAuthenticationProcessors
public Saml2UserAuthenticationConfigurer postAuthenticationProcessors(org.springframework.security.config.Customizer<List<PostAuthenticationProcessor>> customizer) Customizes the list ofPostAuthenticationProcessor
s.- Parameters:
customizer
- aCustomizer
- Returns:
- the
Saml2UserAuthenticationConfigurer
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
-