Class SecurityConfig

java.lang.Object
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
de.ikor.sip.foundation.security.config.SecurityConfig
All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>, org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>

@Configuration @EnableWebSecurity public class SecurityConfig extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
Central place of all config related stuff for spring-security settings regarding the sip authentication features
Author:
thomas.stieglmaier
  • Constructor Summary

    Constructors
    Constructor
    Description
    Autowired constructor for creating SIP Security Configuration
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.authentication.AuthenticationManager
    Register Spring-security provided authenticationManager as a @Bean
    protected void
    configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder authManagerBuilder)
     
    protected void
    configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
     
    void
    configure(org.springframework.security.config.annotation.web.builders.WebSecurity web)
    Set globally ignored endpoints from config

    Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter

    authenticationManager, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SecurityConfig

      @Autowired public SecurityConfig(Optional<List<SIPAuthenticationProvider<?>>> authProviders, SecurityConfigProperties config, Optional<TokenExtractors> tokenExtractors)
      Autowired constructor for creating SIP Security Configuration
      Parameters:
      authProviders - (optional) list of auth providers defined in the config
      config - SIP Security config
      tokenExtractors - (optional) registered token extractors filled by authProviders
  • Method Details

    • authenticationManagerBean

      @Bean public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws Exception
      Register Spring-security provided authenticationManager as a @Bean
      Overrides:
      authenticationManagerBean in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
      Throws:
      Exception
    • configure

      protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder authManagerBuilder) throws IllegalStateException
      Overrides:
      configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
      Throws:
      IllegalStateException
    • configure

      protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
      Overrides:
      configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
      Throws:
      Exception
    • configure

      public void configure(org.springframework.security.config.annotation.web.builders.WebSecurity web)
      Set globally ignored endpoints from config
      Specified by:
      configure in interface org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>
      Overrides:
      configure in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter