Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
e1aadae4
Commit
e1aadae4
authored
Dec 13, 2020
by
zhengjie
Browse files
[代码优化](v2.6):bug fix
close
https://github.com/elunez/eladmin/issues/544
parent
35b821d7
Changes
1
Show whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/security/security/TokenProvider.java
View file @
e1aadae4
...
@@ -43,7 +43,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -43,7 +43,7 @@ public class TokenProvider implements InitializingBean {
private
final
SecurityProperties
properties
;
private
final
SecurityProperties
properties
;
private
final
RedisUtils
redisUtils
;
private
final
RedisUtils
redisUtils
;
public
static
final
String
AUTHORITIES_KEY
=
"
auth
"
;
public
static
final
String
AUTHORITIES_KEY
=
"
user
"
;
private
JwtParser
jwtParser
;
private
JwtParser
jwtParser
;
private
JwtBuilder
jwtBuilder
;
private
JwtBuilder
jwtBuilder
;
...
@@ -74,6 +74,7 @@ public class TokenProvider implements InitializingBean {
...
@@ -74,6 +74,7 @@ public class TokenProvider implements InitializingBean {
return
jwtBuilder
return
jwtBuilder
// 加入ID确保生成的 Token 都不一致
// 加入ID确保生成的 Token 都不一致
.
setId
(
IdUtil
.
simpleUUID
())
.
setId
(
IdUtil
.
simpleUUID
())
.
claim
(
AUTHORITIES_KEY
,
authentication
.
getName
())
.
setSubject
(
authentication
.
getName
())
.
setSubject
(
authentication
.
getName
())
.
compact
();
.
compact
();
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment