|
|
|
|
|
|
|
|
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); |