@@ -37,6 +37,10 @@ public class CommonsConfig { | |||
* 大气权限接口地址 | |||
*/ | |||
public static String airmonitorPermissionUrl; | |||
/** | |||
* 电信城管权限接口地址 | |||
*/ | |||
public static String telecomumalePermissionUrl; | |||
@Value("${tuoheng.hhz-admin-perUrl}") | |||
@@ -64,4 +68,9 @@ public class CommonsConfig { | |||
airmonitorPermissionUrl = url; | |||
} | |||
@Value("${tuoheng.telecomumale-admin-perUrl}") | |||
public void setTelecomumalePermissionUrl(String url) { | |||
telecomumalePermissionUrl = url; | |||
} | |||
} |
@@ -82,6 +82,7 @@ public class WebSecurityConfig { | |||
.pathMatchers("/oidc/admin/tenant/**", "/oidc/admin/client/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_OIDC_ADMIN) | |||
.pathMatchers("/waterway/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_WATERWAY_ADMIN) | |||
.pathMatchers("/waterway/miniprogram/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_WATERWAY_MP) | |||
.pathMatchers("/telecomumale/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_TELECOMUMALE_ADMIN) | |||
.pathMatchers("/weptsp/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_WEPTSP_ADMIN) | |||
.pathMatchers("/airmonitor/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_AIRMONITOR_ADMIN) | |||
.pathMatchers("/oidc/admin/user/**").authenticated() |
@@ -58,4 +58,10 @@ public class AuthorityConstant { | |||
*/ | |||
public static final String SCOPE_TUOHNEG_AIRMONITOR_ADMIN = "SCOPE_tuoheng-airmonitor-admin"; | |||
//public static final String SCOPE_TUOHNEG_AIRPORT_MP= "SCOPE_tuoheng-weptsp-mp"; | |||
/** | |||
* Telecomumale 用户权限 | |||
*/ | |||
public static final String SCOPE_TUOHNEG_TELECOMUMALE_ADMIN = "SCOPE_tuoheng-telecomumale-admin"; | |||
//public static final String SCOPE_TUOHNEG_AIRPORT_MP= "SCOPE_tuoheng-weptsp-mp"; | |||
} |
@@ -69,6 +69,9 @@ public class PermitPathConstant { | |||
public static String weptspPermitUrlStr[] = { | |||
"/weptsp/admin/download/workStreamExcel/**", | |||
"/weptsp/admin/inspection/uploadFlightUrl/**", | |||
"/weptsp/admin/inspection/updateTaskByCode/**", | |||
"/weptsp/admin/dsp/callback/**" | |||
}; | |||
public static String airmonitorPermitUrlStr[] = { |
@@ -40,6 +40,8 @@ public class GatewayUrlPathUtil { | |||
private static final String AIRMONITOR_ADMIN = "tuoheng-airmonitor-admin"; | |||
private static final String TELECOMUMALE_ADMIN = "tuoheng-telecomumale-admin"; | |||
/** | |||
* 获取 gateway 路由前缀,匹配url | |||
* | |||
@@ -73,6 +75,9 @@ public class GatewayUrlPathUtil { | |||
case AIRMONITOR_ADMIN: | |||
apiPath = "/airmonitor/admin"; | |||
break; | |||
case TELECOMUMALE_ADMIN: | |||
apiPath = "/telecomumale/admin"; | |||
break; | |||
default: | |||
break; | |||
} | |||
@@ -103,6 +108,9 @@ public class GatewayUrlPathUtil { | |||
if (clientId.equals(AIRMONITOR_ADMIN)) { | |||
url = CommonsConfig.airmonitorPermissionUrl; | |||
} | |||
if (clientId.equals(TELECOMUMALE_ADMIN)) { | |||
url = CommonsConfig.telecomumalePermissionUrl; | |||
} | |||
log.info("getRoleIdByApiUrlPermission -url:{},token:{}", url, token); | |||
if (StringUtils.isNotBlank(url)) { | |||
HttpHeaders resultRequestHeader = new HttpHeaders(); |
@@ -231,6 +231,13 @@ spring: | |||
- Path=/airport/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# 电信城管admin服务 | |||
- id: tuoheng-telecomumale-admin | |||
uri: lb://tuoheng-telecomumale-admin | |||
predicates: | |||
- Path=/telecomumale/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
@@ -263,4 +270,5 @@ tuoheng: | |||
freeway-admin-perUrl: http://192.168.11.11:9117/permission/getRoleIdList | |||
waterway-admin-perUrl: http://192.168.11.11:9120/permission/getRoleIdList | |||
weptsp-admin-perUrl: http://192.168.11.11:9140/permission/getRoleIdList | |||
airmonitor-admin-perUrl: http://192.168.11.11:9130/permission/getRoleIdList | |||
airmonitor-admin-perUrl: http://192.168.11.11:9130/permission/getRoleIdList | |||
telecomumale-admin-perUrl: http://192.168.11.11:9150/permission/getRoleIdList |
@@ -209,6 +209,13 @@ spring: | |||
- Path=/airport/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# 电信城管admin服务 | |||
- id: tuoheng-telecomumale-admin | |||
uri: lb://tuoheng-telecomumale-admin | |||
predicates: | |||
- Path=/telecomumale/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
@@ -239,4 +246,7 @@ security: | |||
tuoheng: | |||
hhz-admin-perUrl: https://hhz.t-aaron.com/permission/getRoleIdList | |||
freeway-admin-perUrl: https://freeway.t-aaron.com/permission/getRoleIdList | |||
waterway-admin-perUrl: https://waterway.t-aaron.com/permission/getRoleIdList | |||
waterway-admin-perUrl: https://waterway.t-aaron.com/permission/getRoleIdList | |||
airmonitor-admin-perUrl: https://airmonitor.t-aaron.com/permission/getRoleIdList | |||
weptsp-admin-perUrl: https://weptsp.t-aaron.com/permission/getRoleIdList | |||
telecomumale-admin-perUrl: https://telecomumale.t-aaron.com/permission/getRoleIdList |
@@ -224,6 +224,13 @@ spring: | |||
- Path=/airport/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# 电信城管admin服务 | |||
- id: tuoheng-telecomumale-admin | |||
uri: lb://tuoheng-telecomumale-admin | |||
predicates: | |||
- Path=/telecomumale/admin/** | |||
filters: | |||
- StripPrefix=2 | |||
# Redis数据源 | |||
redis: | |||
# 缓存库默认索引0 | |||
@@ -256,4 +263,5 @@ tuoheng: | |||
freeway-admin-perUrl: https://freeway-test.t-aaron.com/permission/getRoleIdList | |||
waterway-admin-perUrl: https://waterway-test.t-aaron.com/permission/getRoleIdList | |||
weptsp-admin-perUrl: https://weptsp-test.t-aaron.com/permission/getRoleIdList | |||
airmonitor-admin-perUrl: https://airmonitor-test.t-aaron.com/permission/getRoleIdList | |||
airmonitor-admin-perUrl: https://airmonitor-test.t-aaron.com/permission/getRoleIdList | |||
telecomumale-admin-perUrl: https://telecomumale-test.t-aaron.com/permission/getRoleIdList |