!30 修改hashmap初始化的值

Merge pull request !30 from SingleKingdom/dev
This commit is contained in:
pig4cloud.com 2019-10-11 17:13:08 +08:00 committed by Gitee
commit 311f180619

View File

@ -95,7 +95,7 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap
@Bean
public TokenEnhancer tokenEnhancer() {
return (accessToken, authentication) -> {
final Map<String, Object> additionalInfo = new HashMap<>(1);
final Map<String, Object> additionalInfo = new HashMap<>(4);
PigUser pigUser = (PigUser) authentication.getUserAuthentication().getPrincipal();
additionalInfo.put(SecurityConstants.DETAILS_LICENSE, SecurityConstants.PROJECT_LICENSE);
additionalInfo.put(SecurityConstants.DETAILS_USER_ID, pigUser.getId());