@@ -49,6 +49,10 @@ public class CommonsConfig { | |||
* 机场系统接口地址 | |||
*/ | |||
public static String airportPermissionUrl; | |||
/** | |||
* 全时空系统接口地址 | |||
*/ | |||
public static String spacetimePermissionUrl; | |||
@Value("${tuoheng.hhz-admin-perUrl}") | |||
@@ -56,6 +60,10 @@ public class CommonsConfig { | |||
hhzPermissionUrl = url; | |||
} | |||
@Value("${tuoheng.spacetime-admin-perUrl}") | |||
public void setSpacetimePermissionUrl(String url) { | |||
spacetimePermissionUrl = url; | |||
} | |||
@Value("${tuoheng.freeway-admin-perUrl}") | |||
public void setFreewayPermissionUrl(String url) { | |||
freewayPermissionUrl = url; |
@@ -93,6 +93,7 @@ public class WebSecurityConfig { | |||
.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("/alert/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_ALERT_ADMIN) | |||
.pathMatchers("/spacetime/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_SPACETIME_ADMIN) | |||
.pathMatchers("/airport/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_AIRPORT_ADMIN) | |||
.pathMatchers("/oidc/admin/user/**").authenticated() | |||
.pathMatchers("/api/inspection/**").authenticated() |
@@ -76,4 +76,10 @@ public class AuthorityConstant { | |||
*/ | |||
public static final String SCOPE_TUOHNEG_AIRPORT_ADMIN = "SCOPE_tuoheng-airport-admin"; | |||
//public static final String SCOPE_TUOHNEG_ALERT_MP= "SCOPE_tuoheng-alert-mp"; | |||
/** | |||
* Spacetime 用户权限 | |||
*/ | |||
public static final String SCOPE_TUOHNEG_SPACETIME_ADMIN = "SCOPE_tuoheng-spacetime-admin"; | |||
//public static final String SCOPE_TUOHNEG_ALERT_MP= "SCOPE_tuoheng-alert-mp"; | |||
} |
@@ -46,6 +46,8 @@ public class GatewayUrlPathUtil { | |||
private static final String AIRPORT_ADMIN = "tuoheng-airport-admin"; | |||
private static final String SPACETIME_ADMIN = "tuoheng-spacetime-admin"; | |||
/** | |||
* 获取 gateway 路由前缀,匹配url | |||
@@ -89,6 +91,9 @@ public class GatewayUrlPathUtil { | |||
case ALERT_ADMIN: | |||
apiPath = "/alert/admin"; | |||
break; | |||
case SPACETIME_ADMIN: | |||
apiPath = "/spacetime/admin"; | |||
break; | |||
default: | |||
break; | |||
} | |||
@@ -128,6 +133,9 @@ public class GatewayUrlPathUtil { | |||
if (clientId.equals(AIRPORT_ADMIN)) { | |||
url = CommonsConfig.airportPermissionUrl; | |||
} | |||
if (clientId.equals(SPACETIME_ADMIN)) { | |||
url = CommonsConfig.spacetimePermissionUrl; | |||
} | |||
log.info("getRoleIdByApiUrlPermission -url:{},token:{}", url, token); | |||
if (StringUtils.isNotBlank(url)) { | |||
HttpHeaders resultRequestHeader = new HttpHeaders(); |
@@ -297,4 +297,5 @@ tuoheng: | |||
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 | |||
telecomumale-admin-perUrl: http://192.168.11.11:9150/permission/getRoleIdList | |||
telecomumale-admin-perUrl: http://192.168.11.11:9150/permission/getRoleIdList | |||
spacetime-admin-perUrl: http://192.168.11.11:9170/permission/getRoleIdList |
@@ -289,4 +289,5 @@ tuoheng: | |||
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 | |||
alert-admin-perUrl: https://alert.t-aaron.com/permission/getRoleIdList | |||
alert-admin-perUrl: https://alert.t-aaron.com/permission/getRoleIdList | |||
spacetime-admin-perUrl: https://spacetime.t-aaron.com/permission/getRoleIdList |
@@ -297,4 +297,5 @@ tuoheng: | |||
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 | |||
telecomumale-admin-perUrl: https://telecomumale-test.t-aaron.com/permission/getRoleIdList | |||
telecomumale-admin-perUrl: https://telecomumale-test.t-aaron.com/permission/getRoleIdList | |||
spacetime-admin-perUrl: https://spacetime-test.t-aaron.com/permission/getRoleIdList |