We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 35b821d commit e1aadaeCopy full SHA for e1aadae
1 file changed
eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java
@@ -43,7 +43,7 @@ public class TokenProvider implements InitializingBean {
43
44
private final SecurityProperties properties;
45
private final RedisUtils redisUtils;
46
- public static final String AUTHORITIES_KEY = "auth";
+ public static final String AUTHORITIES_KEY = "user";
47
private JwtParser jwtParser;
48
private JwtBuilder jwtBuilder;
49
@@ -74,6 +74,7 @@ public String createToken(Authentication authentication) {
74
return jwtBuilder
75
// 加入ID确保生成的 Token 都不一致
76
.setId(IdUtil.simpleUUID())
77
+ .claim(AUTHORITIES_KEY, authentication.getName())
78
.setSubject(authentication.getName())
79
.compact();
80
}
0 commit comments