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
d6af3c15
Commit
d6af3c15
authored
Apr 15, 2019
by
zhengjie
Browse files
update JwtTokenUtil、README.md
parent
e60a02fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d6af3c15
...
...
@@ -7,7 +7,7 @@
| | 后端源码 | 前端源码 |
|--- |--- | --- |
| github | https://github.com/elunez/eladmin | https://github.com/elunez/eladmin-qd |
| 码云 | https://git
hub
.com/elunez/eladmin | https://gitee.com/elunez/eladmin-qt |
| 码云 | https://git
ee
.com/elunez/eladmin | https://gitee.com/elunez/eladmin-qt |
#### 开发文档
[
https://docs.auauz.net/#/
](
https://docs.auauz.net/#/
)
...
...
eladmin-system/src/main/java/me/zhengjie/modules/security/utils/JwtTokenUtil.java
View file @
d6af3c15
...
...
@@ -105,14 +105,11 @@ public class JwtTokenUtil implements Serializable {
public
Boolean
validateToken
(
String
token
,
UserDetails
userDetails
)
{
JwtUser
user
=
(
JwtUser
)
userDetails
;
final
String
username
=
getUsernameFromToken
(
token
);
final
Date
created
=
getIssuedAtDateFromToken
(
token
);
// final Date expiration = getExpirationDateFromToken(token);
// 如果token存在,且token创建日期 > 最后修改密码的日期 则代表token有效
return
(
username
.
equals
(
user
.
getUsername
())
&&
!
isTokenExpired
(
token
)
&&
!
isCreatedBeforeLastPasswordReset
(
created
,
user
.
getLastPasswordResetDate
())
return
(
isTokenExpired
(
token
)
&&
!
isCreatedBeforeLastPasswordReset
(
created
,
user
.
getLastPasswordResetDate
())
);
}
...
...
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