|
|
@ -45,6 +45,11 @@ public class BladeJwtTokenEnhancer implements TokenEnhancer { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { |
|
|
|
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken, OAuth2Authentication authentication) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (authentication.getUserAuthentication() == null) { |
|
|
|
|
|
|
|
return accessToken; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
BladeUserDetails principal = (BladeUserDetails) authentication.getUserAuthentication().getPrincipal(); |
|
|
|
BladeUserDetails principal = (BladeUserDetails) authentication.getUserAuthentication().getPrincipal(); |
|
|
|
|
|
|
|
|
|
|
|
//token参数增强
|
|
|
|
//token参数增强
|
|
|
|