mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 01:18:27 +08:00
!50 判断jwt是否过期,应该是过期时间在当前时间之前才是过期
Merge pull request !50 from MaxKeyTop/cherry-pick-1735891491 需要进一步验证
This commit is contained in:
commit
c44715c6ee
@ -122,7 +122,7 @@ public class AuthJwtService {
|
||||
if(StringUtils.isNotBlank(authToken) && authToken.length() > 20) {
|
||||
try {
|
||||
JWTClaimsSet claims = resolve(authToken);
|
||||
boolean isExpiration = claims.getExpirationTime().after(DateTime.now().toDate());
|
||||
boolean isExpiration = claims.getExpirationTime().before(DateTime.now().toDate());
|
||||
boolean isVerify = hmac512Service.verify(authToken);
|
||||
_logger.debug("JWT Validate {} " , isVerify && isExpiration);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user