Skip to content

Commit

Permalink
fix: temporary make disable the filters
Browse files Browse the repository at this point in the history
  • Loading branch information
JIUNG9 committed Dec 14, 2023
1 parent c936d87 commit e06dcb5
Showing 1 changed file with 33 additions and 34 deletions.
67 changes: 33 additions & 34 deletions src/main/java/kr/bb/apigateway/common/SecurityConfig.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package kr.bb.apigateway.common;

import kr.bb.apigateway.social.filter.SocialAuthorizationGatewayFilter;
import kr.bb.apigateway.store.filter.StoreAuthorizationGatewayFilter;

import kr.bb.apigateway.systsem.filter.SystemAdminAuthorizationGatewayFilter;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.cloud.gateway.filter.GlobalFilter;
Expand All @@ -12,36 +11,36 @@
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;

@EnableWebFluxSecurity
@EnableReactiveMethodSecurity
public class SecurityConfig {

@Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
http
.csrf(csrf -> csrf.disable());
return http.build();

}

@Order(1)
@Qualifier("socialAuthorizationGatewayFilter")
@Bean
public GlobalFilter socialAuthorizationGatewayFilter() {
return new SocialAuthorizationGatewayFilter();
}

@Order(0)
@Qualifier("systemAdminAuthorizationGatewayFilter")
@Bean
public GlobalFilter systemAdminAuthorizationGatewayFilter() {
return new SystemAdminAuthorizationGatewayFilter();
}
//@EnableWebFluxSecurity
//@EnableReactiveMethodSecurity
//public class SecurityConfig {

@Order(2)
@Qualifier("storeAuthorizationGatewayFilter")
@Bean
public GlobalFilter storeAuthorizationGatewayFilter() {
return new StoreAuthorizationGatewayFilter();
}
}
// @Bean
// public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
// http
// .csrf(csrf -> csrf.disable());
// return http.build();
//
// }
//
// @Order(1)
// @Qualifier("socialAuthorizationGatewayFilter")
// @Bean
// public GlobalFilter socialAuthorizationGatewayFilter() {
// return new SocialAuthorizationGatewayFilter();
// }
//
// @Order(0)
// @Qualifier("systemAdminAuthorizationGatewayFilter")
// @Bean
// public GlobalFilter systemAdminAuthorizationGatewayFilter() {
// return new SystemAdminAuthorizationGatewayFilter();
// }
//
// @Order(2)
// @Qualifier("storeAuthorizationGatewayFilter")
// @Bean
// public GlobalFilter storeAuthorizationGatewayFilter() {
// return new StoreAuthorizationGatewayFilter();
// }
//}

0 comments on commit e06dcb5

Please sign in to comment.