Skip to content

Commit

Permalink
update JwtTokenUtil、README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengjie committed Apr 15, 2019
1 parent e60a02f commit d6af3c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| | 后端源码 | 前端源码 |
|--- |--- | --- |
| github | https://github.com/elunez/eladmin | https://github.com/elunez/eladmin-qd |
| 码云 | https://github.com/elunez/eladmin | https://gitee.com/elunez/eladmin-qt |
| 码云 | https://gitee.com/elunez/eladmin | https://gitee.com/elunez/eladmin-qt |
#### 开发文档
[https://docs.auauz.net/#/](https://docs.auauz.net/#/)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,11 @@ public String refreshToken(String token) {

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())
);
}

Expand Down

0 comments on commit d6af3c1

Please sign in to comment.