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 SecurityConfig(Optional<List<SIPAuthenticationProvider<?>>> authProviders, SecurityConfigProperties config, Optional<TokenExtractors> tokenExtractors)
Autowired constructor for creating SIP Security Configuration
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.authentication.AuthenticationManager
authenticationManagerBean()
Register Spring-security provided authenticationManager as a @Beanprotected 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
-
-
-
-
Constructor Detail
-
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 configconfig
- SIP Security configtokenExtractors
- (optional) registered token extractors filled by authProviders
-
-
Method Detail
-
authenticationManagerBean
@Bean public org.springframework.security.authentication.AuthenticationManager authenticationManagerBean() throws Exception
Register Spring-security provided authenticationManager as a @Bean- Overrides:
authenticationManagerBean
in classorg.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 classorg.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 classorg.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 interfaceorg.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>
- Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
-