关闭权限控制
This commit is contained in:
@ -15,24 +15,24 @@ import com.chinaunicom.mall.ebtp.cloud.security.starter.filter.TokenAuthenticati
|
|||||||
* @author Ajaxfan
|
* @author Ajaxfan
|
||||||
*/
|
*/
|
||||||
@EnableWebSecurity
|
@EnableWebSecurity
|
||||||
@EnableGlobalMethodSecurity(prePostEnabled = true, jsr250Enabled = true, securedEnabled = true)
|
@EnableGlobalMethodSecurity(prePostEnabled = false, jsr250Enabled = true, securedEnabled = true)
|
||||||
public class BrowserSecurityConfig extends WebSecurityConfigurerAdapter {
|
public class BrowserSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public TokenAuthenticationFilter authenticationTokenFilterBean() {
|
public TokenAuthenticationFilter authenticationTokenFilterBean() {
|
||||||
return new TokenAuthenticationFilter();
|
return new TokenAuthenticationFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 向Filter链中插入自定义TokenFilter
|
||||||
|
*
|
||||||
|
* @param http
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
|
http.csrf().disable();
|
||||||
|
http.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 向Filter链中插入自定义TokenFilter
|
|
||||||
*
|
|
||||||
* @param http
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
|
||||||
http.csrf().disable();
|
|
||||||
http.addFilterBefore(authenticationTokenFilterBean(), UsernamePasswordAuthenticationFilter.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user