config相关配置。

This commit is contained in:
Renpc-kilig 2021-01-21 17:25:46 +08:00
parent d96f205eda
commit 133ce514b5

View File

@ -35,22 +35,23 @@ public class AuthClientSecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.formLogin()
.defaultSuccessUrl("/authorize", true)
.and()
.logout().logoutSuccessUrl(authServer.getOauthLogout())
.and()
.authorizeRequests().antMatchers("/app/**", "/route/file/**", "/assets/**","/resource/**").permitAll()
.and()
.authorizeRequests()
.anyRequest()
.access("@clientRbacService.hasPermission(request, authentication)")
.and()
.headers().frameOptions().sameOrigin()
.and()
.cors()
.and()
.csrf().disable();
http
.formLogin()
.defaultSuccessUrl("/authorize", true)
.and()
.logout().logoutSuccessUrl(authServer.getOauthLogout())
.and()
.authorizeRequests().antMatchers("/app/**","/resource/**", "/route/file/**", "/assets/**").permitAll()
.and()
.authorizeRequests()
.anyRequest()
.access("@clientRbacService.hasPermission(request, authentication)")
.and()
.headers().frameOptions().sameOrigin()
.and()
.cors()
.and()
.csrf().disable();
}
@Bean