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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthnRequestProcessor(org.springframework.security.config.Customizer<Saml2AuthnRequestProcessorConfigurer> customizer) Customizes theAuthnRequestprocessor.voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) org.springframework.security.web.util.matcher.RequestMatcherReturns aRequestMatcherfor the SAML Identity Provider endpoints.idpMetadataEndpoint(org.springframework.security.config.Customizer<Saml2IdpMetadataEndpointConfigurer> customizer) Customizes the IdP metadata endpoint.voidinit(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 voidvalidateIdentityProviderSettings(IdentityProviderSettings identityProviderSettings) Validates thatIdentityProviderSettingshas 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, withObjectPostProcessorMethods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter
addObjectPostProcessor, 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- theCustomizerproviding access to theSaml2IdpMetadataEndpointConfigurer- Returns:
- the
Saml2IdpConfigurerfor further configuration
-
authnRequestProcessor
public Saml2IdpConfigurer authnRequestProcessor(org.springframework.security.config.Customizer<Saml2AuthnRequestProcessorConfigurer> customizer) Customizes theAuthnRequestprocessor.- Parameters:
customizer- theCustomizerproviding access to theSaml2AuthnRequestProcessorConfigurer- Returns:
- the
Saml2IdpConfigurerfor further configuration
-
userAuthentication
public Saml2IdpConfigurer userAuthentication(org.springframework.security.config.Customizer<Saml2UserAuthenticationConfigurer> customizer) Customizes the user authentication processor.- Parameters:
customizer- theCustomizerproviding access to theSaml2UserAuthenticationConfigurer- Returns:
- the
Saml2IdpConfigurerfor further configuration
-
responseBuilder
public Saml2IdpConfigurer responseBuilder(org.springframework.security.config.Customizer<Saml2ResponseBuilder> customizer) Customizes theSaml2ResponseBuilder.- Parameters:
customizer- theCustomizerproviding access to theSaml2ResponseBuilder- Returns:
- the
Saml2IdpConfigurerfor further configuration
-
responseSender
public Saml2IdpConfigurer responseSender(org.springframework.security.config.Customizer<Saml2ResponseSender> customizer) Customizes theSaml2ResponseSender.- Parameters:
customizer- theCustomizerproviding access to theSaml2ResponseSender- Returns:
- the
Saml2IdpConfigurerfor further configuration
-
getEndpointsMatcher
public org.springframework.security.web.util.matcher.RequestMatcher getEndpointsMatcher()Returns aRequestMatcherfor the SAML Identity Provider endpoints.- Returns:
- a
RequestMatcher
-
init
public void init(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) - Specified by:
initin interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity> - Overrides:
initin 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:
configurein interfaceorg.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity> - Overrides:
configurein 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 thatIdentityProviderSettingshas been set up so that the Identity Provider can function.- Parameters:
identityProviderSettings- the settings to validate- Throws:
IllegalArgumentException
-