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 Details

    • Saml2IdpConfigurer

      public Saml2IdpConfigurer()
  • Method Details

    • idpMetadataEndpoint

      public Saml2IdpConfigurer idpMetadataEndpoint(org.springframework.security.config.Customizer<Saml2IdpMetadataEndpointConfigurer> customizer)
      Customizes the IdP metadata endpoint.
      Parameters:
      customizer - the Customizer providing access to the Saml2IdpMetadataEndpointConfigurer
      Returns:
      the Saml2IdpConfigurer for further configuration
    • authnRequestProcessor

      public Saml2IdpConfigurer authnRequestProcessor(org.springframework.security.config.Customizer<Saml2AuthnRequestProcessorConfigurer> customizer)
      Customizes the AuthnRequest processor.
      Parameters:
      customizer - the Customizer providing access to the Saml2AuthnRequestProcessorConfigurer
      Returns:
      the Saml2IdpConfigurer for further configuration
    • userAuthentication

      public Saml2IdpConfigurer userAuthentication(org.springframework.security.config.Customizer<Saml2UserAuthenticationConfigurer> customizer)
      Customizes the user authentication processor.
      Parameters:
      customizer - the Customizer providing access to the Saml2UserAuthenticationConfigurer
      Returns:
      the Saml2IdpConfigurer for further configuration
    • responseBuilder

      public Saml2IdpConfigurer responseBuilder(org.springframework.security.config.Customizer<Saml2ResponseBuilder> customizer)
      Customizes the Saml2ResponseBuilder.
      Parameters:
      customizer - the Customizer providing access to the Saml2ResponseBuilder
      Returns:
      the Saml2IdpConfigurer for further configuration
    • responseSender

      public Saml2IdpConfigurer responseSender(org.springframework.security.config.Customizer<Saml2ResponseSender> customizer)
      Customizes the Saml2ResponseSender.
      Parameters:
      customizer - the Customizer providing access to the Saml2ResponseSender
      Returns:
      the Saml2IdpConfigurer for further configuration
    • getEndpointsMatcher

      public org.springframework.security.web.util.matcher.RequestMatcher getEndpointsMatcher()
      Returns a RequestMatcher 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 interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
      Overrides:
      init in class org.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 interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
      Overrides:
      configure in class org.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 that IdentityProviderSettings has been set up so that the Identity Provider can function.
      Parameters:
      identityProviderSettings - the settings to validate
      Throws:
      IllegalArgumentException