Browse Source

Merge branch 'develop' of gitadmin/tuoheng_oidc into release

tags/v2.5.2^2
xuziqing 1 year ago
parent
commit
c6d5398996
1 changed files with 4 additions and 2 deletions
  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 View File

@@ -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…
Cancel
Save