Commit 1e177357 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent 5b42d5f6
......@@ -85,10 +85,10 @@ public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@SneakyThrows
protected void configure(HttpSecurity http) {
http.addFilterBefore(getPasswordDecoderFilter(),PasswordDecoderFilter.class)
//.formLogin().loginPage("/token/login").loginProcessingUrl("/token/form")
//.failureHandler(authenticationFailureHandler()).and().logout()
//.logoutSuccessHandler(logoutSuccessHandler()).deleteCookies("JSESSIONID").invalidateHttpSession(true)
//.and()
.formLogin().loginPage("/token/login").loginProcessingUrl("/token/form")
.failureHandler(authenticationFailureHandler()).and().logout()
.logoutSuccessHandler(logoutSuccessHandler()).deleteCookies("JSESSIONID").invalidateHttpSession(true)
.and()
.authorizeRequests().antMatchers("/**/login","/token/**", "/actuator/**", "/mobile/**", "/oauth/token","/weixin/callback","/oauth/**", "/wxLogin").permitAll()
.anyRequest().authenticated().and().csrf().disable();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment