|
|
@@ -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()))); |
|
|
|
} |
|
|
|
}; |
|
|
|
} |