mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
1.修改数据源标识的获取途径,由原先从前端传递,到从网关统一传递
This commit is contained in:
+2
-1
@@ -152,7 +152,8 @@ public class TokenAuthenticationFilter implements GlobalFilter, Ordered {
|
||||
OAuth2AccessTokenCheckRespDTO tokenInfo = result.getData();
|
||||
return new LoginUser().setId(tokenInfo.getUserId()).setUserType(tokenInfo.getUserType())
|
||||
.setOrganId(tokenInfo.getOrganId()).setScopes(tokenInfo.getScopes())
|
||||
.setLarge(tokenInfo.getLarge()).setDbNo(tokenInfo.getDbNo()).setTableNo(tokenInfo.getTableNo());
|
||||
.setLarge(tokenInfo.getLarge()).setDbNo(tokenInfo.getDbNo()).setTableNo(tokenInfo.getTableNo())
|
||||
.setDataCode(tokenInfo.getDataCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,6 +24,7 @@ public class SecurityFrameworkUtils {
|
||||
|
||||
private static final String LOGIN_USER_ID_ATTR = "login-user-id";
|
||||
private static final String LOGIN_USER_TYPE_ATTR = "login-user-type";
|
||||
private static final String DATA_CODE = "data-code";
|
||||
|
||||
private SecurityFrameworkUtils() {}
|
||||
|
||||
@@ -101,6 +102,7 @@ public class SecurityFrameworkUtils {
|
||||
*/
|
||||
public static void setLoginUserHeader(ServerHttpRequest.Builder builder, LoginUser user) {
|
||||
builder.header(LOGIN_USER_HEADER, JsonUtils.toJsonString(user));
|
||||
builder.header(DATA_CODE, user.getDataCode());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user