token-authentication-example icon indicating copy to clipboard operation
token-authentication-example copied to clipboard

使用token做鉴权的例子

Results 1 token-authentication-example issues
Sort by recently updated
recently updated
newest added

使用token+username作为key把当前时间戳也存入redis 这一步主要用来判断用户登录的token是否快要过期了, 如果直接使用redis的查看剩余时间的API, 就不需要这么做了吧? /** * 根据指定key 查看剩余存活时间 * @param key * @return */ public Long getFreeTime(String key) { return redisTemplate.getExpire(key);}