@Configuration
@EnableWebSecurity
public class SecurityConfig
extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
Constructor and Description |
---|
SecurityConfig(AuthenticateService authenticateService) |
Modifier and Type | Method and Description |
---|---|
AAAUsernamePasswordProvider |
authenticationProvider()
Configures AAA authentication provider with a user service and a password
encoder.
|
protected void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
void |
configure(org.springframework.security.config.annotation.web.builders.WebSecurity web) |
org.springframework.web.cors.CorsConfigurationSource |
corsConfigurationSource() |
JwtTokenAuthenticationFilter |
jwtTokenAuthenticationFilter()
Enable JWT authentication.
|
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder |
passwordEncoder()
Sets bcrypt as the password encoding practice.
|
org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler |
webExpressionHandler()
Configures AAA operations to be evaluated as spring permissions.
|
authenticationManager, authenticationManagerBean, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
@Autowired public SecurityConfig(AuthenticateService authenticateService)
public void configure(org.springframework.security.config.annotation.web.builders.WebSecurity web)
configure
in interface org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>
configure
in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
configure
in class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
Exception
@Bean public JwtTokenAuthenticationFilter jwtTokenAuthenticationFilter()
@Bean public org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler webExpressionHandler()
@Bean public AAAUsernamePasswordProvider authenticationProvider()
@Bean public org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder passwordEncoder()
@Bean public org.springframework.web.cors.CorsConfigurationSource corsConfigurationSource()
Copyright © 2020. All rights reserved.