db-token校验过期时间
parent
578698bee4
commit
cf2a5a0498
|
|
@ -140,9 +140,15 @@ public class TokenServiceDbImpl implements TokenService {
|
||||||
if (model == null) {
|
if (model == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 校验是否已过期
|
||||||
|
if (model.getExpireTime().getTime() > System.currentTimeMillis()) {
|
||||||
return JSONObject.parseObject(model.getVal(), LoginUser.class);
|
return JSONObject.parseObject(model.getVal(), LoginUser.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
private Key getKeyInstance() {
|
private Key getKeyInstance() {
|
||||||
if (KEY == null) {
|
if (KEY == null) {
|
||||||
synchronized (TokenServiceDbImpl.class) {
|
synchronized (TokenServiceDbImpl.class) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue