xuxueli / xxl-sso

A distributed single-sign-on framework.(分布式单点登录框架XXL-SSO)
http://www.xuxueli.com/xxl-sso/
GNU General Public License v3.0
1.94k stars 818 forks source link

登录态自动延期(支持自定义登录态有效期窗口,默认24H,当登录态有效期窗口过半时,自动顺延一个周期)实现是否有误 #64

Open yinliyun opened 3 years ago

yinliyun commented 3 years ago

// After the expiration time has passed half, Auto refresh if ((System.currentTimeMillis() - xxlUser.getExpireFreshTime()) > xxlUser.getExpireMinute()/2) { xxlUser.setExpireFreshTime(System.currentTimeMillis()); SsoLoginStore.put(storeKey, xxlUser); }

System.currentTimeMillis() - xxlUser.getExpireFreshTime()是毫秒级别 xxlUser.getExpireMinute()/2是分钟级别