Browse Source

更新参数

tags/v2.5.2^2
xiaoying 1 year ago
parent
commit
9cc5c34871
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

params.add("grant_type", "password"); params.add("grant_type", "password");
params.add("scope", "openid profile"); 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()); String authorization = Base64.getEncoder().encodeToString(userMsg.getBytes());


ParameterizedTypeReference<TokenResult> parameterizedTypeReference = ParameterizedTypeReference<TokenResult> parameterizedTypeReference =
tokenResult.setUserName(result.getUserName()); tokenResult.setUserName(result.getUserName());
ProfileResult profile = new ProfileResult(); ProfileResult profile = new ProfileResult();
BeanUtils.copyProperties(tokenResult, profile); BeanUtils.copyProperties(tokenResult, profile);
profile.setSub(clientId);
profile.setSub(username);
profile.setAzp(clientId);
profile.setAuthority(authorityList); profile.setAuthority(authorityList);
profile.setClientRoleList(clientRoleDtoList); profile.setClientRoleList(clientRoleDtoList);
tokenResult.setProfile(profile); tokenResult.setProfile(profile);

Loading…
Cancel
Save