瀏覽代碼

更新参数

tags/v2.5.2^2
xiaoying 1 年之前
父節點
當前提交
9cc5c34871
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. +4
    -2
      tuoheng_oidc_server/src/main/java/com/tuoheng/service/impl/ThirdServiceImpl.java

+ 4
- 2
tuoheng_oidc_server/src/main/java/com/tuoheng/service/impl/ThirdServiceImpl.java 查看文件

@@ -85,7 +85,8 @@ public class ThirdServiceImpl implements ThirdService {
params.add("grant_type", "password");
params.add("scope", "openid profile");
//机场标识
String userMsg = clientPo.getClientId() + ":" + clientPo.getClientSecret();
String clientSecret = clientPo.getClientSecret().split("}")[1];
String userMsg = clientPo.getClientId() + ":" + clientSecret;
String authorization = Base64.getEncoder().encodeToString(userMsg.getBytes());

ParameterizedTypeReference<TokenResult> parameterizedTypeReference =
@@ -134,7 +135,8 @@ public class ThirdServiceImpl implements ThirdService {
tokenResult.setUserName(result.getUserName());
ProfileResult profile = new ProfileResult();
BeanUtils.copyProperties(tokenResult, profile);
profile.setSub(clientId);
profile.setSub(username);
profile.setAzp(clientId);
profile.setAuthority(authorityList);
profile.setClientRoleList(clientRoleDtoList);
tokenResult.setProfile(profile);

Loading…
取消
儲存