Sfoglia il codice sorgente

权限功能相关配置

tags/v2.3.0
chenjiandong 2 anni fa
parent
commit
d9884ad1b3
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. +4
    -3
      tuoheng_oidc_server/src/main/java/com/tuoheng/config/IdTokenCustomizerConfig.java

+ 4
- 3
tuoheng_oidc_server/src/main/java/com/tuoheng/config/IdTokenCustomizerConfig.java Vedi File

@@ -1,5 +1,6 @@
package com.tuoheng.config;

import com.alibaba.fastjson.JSONObject;
import com.tuoheng.mapper.UserMapper;
import com.tuoheng.model.dto.UserBaseInfoDto;
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,9 +46,9 @@ public class IdTokenCustomizerConfig {
.claims(claims ->
claims.put("username", context.getPrincipal().getName()))
.claims(claims ->
claims.put("oUserId", userBaseInfoDto.getUserId()));
/*.claims(claims ->
claims.put("clientRoleList", userBaseInfoDto.getClientRoleDtoList()));*/
claims.put("oUserId", userBaseInfoDto.getUserId()))
.claims(claims ->
claims.put("clientRoleList", JSONObject.toJSONString(userBaseInfoDto.getClientRoleDtoList())));
}
};
}

Loading…
Annulla
Salva