Преглед на файлове

新增oidc配置白名单

pull/146/head
xiaoying преди 10 месеца
родител
ревизия
a488042a75
променени са 2 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. +2
    -0
      src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java
  2. +4
    -0
      src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java

+ 2
- 0
src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java Целия файл

@@ -67,6 +67,7 @@ public class WebSecurityConfig {
String[] telecomumalePermitPath = PermitPathConstant.telecomumaleUrlStr;
String[] alertPermitPath = PermitPathConstant.alertleUrlStr;
String[] airportPermitPath = PermitPathConstant.airportUrlStr;
String[] oidcPermitPath = PermitPathConstant.oidcUrlStr;
httpSecurity
.authorizeExchange()
//.pathMatchers(OAUTH_PATH).hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_DSP_MP, AuthorityConstant.SCOPE_TUOHNEG_DSP_WEB)
@@ -79,6 +80,7 @@ public class WebSecurityConfig {
.pathMatchers(telecomumalePermitPath).permitAll()
.pathMatchers(alertPermitPath).permitAll()
.pathMatchers(airportPermitPath).permitAll()
.pathMatchers(oidcPermitPath).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)

+ 4
- 0
src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java Целия файл

@@ -118,4 +118,8 @@ public class PermitPathConstant {
"/airport/admin/common/**",
"/airport/admin/airportStatus/index/**"
};

public static String oidcUrlStr[] = {
"/oidc/admin/third/redirect/**"
};
}

Loading…
Отказ
Запис