소스 검색

高速平台对接调整

pull/62/head
chenjiandong 1 년 전
부모
커밋
a1659d0ddf
2개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. +3
    -2
      src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java
  2. +7
    -0
      src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java

+ 3
- 2
src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java 파일 보기

@@ -64,11 +64,12 @@ public class WebSecurityConfig {
@Bean
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity httpSecurity){
String[] OAUTH_PATH = oauthUrlStr.split(",");
String[] HhzPermitPath = PermitPathConstant.hhzPermitUrlStr;
String[] hhzPermitPath = PermitPathConstant.hhzPermitUrlStr;
String[] freewayPermitPath = PermitPathConstant.freewayPermitUrlStr;
httpSecurity
.authorizeExchange()
.pathMatchers(OAUTH_PATH).hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_DSP_MP, AuthorityConstant.SCOPE_TUOHNEG_DSP_WEB)
.pathMatchers(HhzPermitPath).permitAll()
.pathMatchers(hhzPermitPath).permitAll().pathMatchers(freewayPermitPath).permitAll()
.pathMatchers("/pilot/miniprogram/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_MP)
.pathMatchers("/pilot/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_ADMIN)
.pathMatchers("/hhz/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_HHZ_ADMIN)

+ 7
- 0
src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java 파일 보기

@@ -31,4 +31,11 @@ public class PermitPathConstant {
"/hhz/api/tencentCloudRtc/genUserSig/**"
};

public static String freewayPermitUrlStr[] = {
"/freeway/admin/inspection/uploadFlightUrl/**",
"/freeway/admin/inspection/uploadFlightUrl/**",
"/airport/inspection/status/**",
"/airport/inspection/track/**"
};

}

Loading…
취소
저장