|
|
@@ -51,6 +51,7 @@ public class GatewayFilterConfig implements GlobalFilter, Ordered { |
|
|
|
List<Integer> roleIds = permissionMap.get(requestUrl);*/ |
|
|
|
//todo:获取当前系统、当前接口 可以访问的角色集合 end |
|
|
|
String token = getToken(exchange); |
|
|
|
System.out.println("登录人token:" + token); |
|
|
|
String username = null; |
|
|
|
Long oUserId = null; |
|
|
|
List<String> authorityList = new ArrayList<>(); |
|
|
@@ -59,7 +60,9 @@ public class GatewayFilterConfig implements GlobalFilter, Ordered { |
|
|
|
//token数据解析 |
|
|
|
DecodedJWT decodedJWT = JWT.decode(token); |
|
|
|
username = decodedJWT.getClaim(USERNAME).asString(); |
|
|
|
System.out.println("登录人username:" + username); |
|
|
|
oUserId = decodedJWT.getClaim(OUSERID).asLong(); |
|
|
|
System.out.println("登录人oUserId:" + oUserId); |
|
|
|
authorityList = decodedJWT.getClaim(SCOPE).asList(String.class); |
|
|
|
clientUserRoleDtoList = decodedJWT.getClaim(CLIENTROLELIST).asList(ClientUserRoleDto.class); |
|
|
|
} |