Class Saml2IdpConfigurer
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<Saml2IdpConfigurer,org.springframework.security.config.annotation.web.builders.HttpSecurity>
se.swedenconnect.spring.saml.idp.config.configurers.Saml2IdpConfigurer
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,
org.springframework.security.config.annotation.web.builders.HttpSecurity>
public class Saml2IdpConfigurer
extends org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<Saml2IdpConfigurer,org.springframework.security.config.annotation.web.builders.HttpSecurity>
An
AbstractHttpConfigurer
for SAML2 Identity Provider support.- Author:
- Martin Lindström
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionauthnRequestProcessor
(org.springframework.security.config.Customizer<Saml2AuthnRequestProcessorConfigurer> customizer) Customizes theAuthnRequest
processor.void
configure
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) org.springframework.security.web.util.matcher.RequestMatcher
Returns aRequestMatcher
for the SAML Identity Provider endpoints.idpMetadataEndpoint
(org.springframework.security.config.Customizer<Saml2IdpMetadataEndpointConfigurer> customizer) Customizes the IdP metadata endpoint.void
init
(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) responseBuilder
(org.springframework.security.config.Customizer<Saml2ResponseBuilder> customizer) Customizes theSaml2ResponseBuilder
.responseSender
(org.springframework.security.config.Customizer<Saml2ResponseSender> customizer) Customizes theSaml2ResponseSender
.userAuthentication
(org.springframework.security.config.Customizer<Saml2UserAuthenticationConfigurer> customizer) Customizes the user authentication processor.static void
validateIdentityProviderSettings
(IdentityProviderSettings identityProviderSettings) Validates thatIdentityProviderSettings
has been set up so that the Identity Provider can function.Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer
disable, getSecurityContextHolderStrategy, withObjectPostProcessor
Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, and, getBuilder, postProcess, setBuilder
-
Constructor Details
-
Saml2IdpConfigurer
public Saml2IdpConfigurer()
-
-
Method Details
-
idpMetadataEndpoint
public Saml2IdpConfigurer idpMetadataEndpoint(org.springframework.security.config.Customizer<Saml2IdpMetadataEndpointConfigurer> customizer) Customizes the IdP metadata endpoint.- Parameters:
customizer
- theCustomizer
providing access to theSaml2IdpMetadataEndpointConfigurer
- Returns:
- the
Saml2IdpConfigurer
for further configuration
-
authnRequestProcessor
public Saml2IdpConfigurer authnRequestProcessor(org.springframework.security.config.Customizer<Saml2AuthnRequestProcessorConfigurer> customizer) Customizes theAuthnRequest
processor.- Parameters:
customizer
- theCustomizer
providing access to theSaml2AuthnRequestProcessorConfigurer
- Returns:
- the
Saml2IdpConfigurer
for further configuration
-
userAuthentication
public Saml2IdpConfigurer userAuthentication(org.springframework.security.config.Customizer<Saml2UserAuthenticationConfigurer> customizer) Customizes the user authentication processor.- Parameters:
customizer
- theCustomizer
providing access to theSaml2UserAuthenticationConfigurer
- Returns:
- the
Saml2IdpConfigurer
for further configuration
-
responseBuilder
public Saml2IdpConfigurer responseBuilder(org.springframework.security.config.Customizer<Saml2ResponseBuilder> customizer) Customizes theSaml2ResponseBuilder
.- Parameters:
customizer
- theCustomizer
providing access to theSaml2ResponseBuilder
- Returns:
- the
Saml2IdpConfigurer
for further configuration
-
responseSender
public Saml2IdpConfigurer responseSender(org.springframework.security.config.Customizer<Saml2ResponseSender> customizer) Customizes theSaml2ResponseSender
.- Parameters:
customizer
- theCustomizer
providing access to theSaml2ResponseSender
- Returns:
- the
Saml2IdpConfigurer
for further configuration
-
getEndpointsMatcher
public org.springframework.security.web.util.matcher.RequestMatcher getEndpointsMatcher()Returns aRequestMatcher
for the SAML Identity Provider endpoints.- Returns:
- a
RequestMatcher
-
init
public void init(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) - Specified by:
init
in interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,
org.springframework.security.config.annotation.web.builders.HttpSecurity> - Overrides:
init
in classorg.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,
org.springframework.security.config.annotation.web.builders.HttpSecurity>
-
configure
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) - Specified by:
configure
in interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,
org.springframework.security.config.annotation.web.builders.HttpSecurity> - Overrides:
configure
in classorg.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,
org.springframework.security.config.annotation.web.builders.HttpSecurity>
-
validateIdentityProviderSettings
public static void validateIdentityProviderSettings(IdentityProviderSettings identityProviderSettings) throws IllegalArgumentException Validates thatIdentityProviderSettings
has been set up so that the Identity Provider can function.- Parameters:
identityProviderSettings
- the settings to validate- Throws:
IllegalArgumentException
-