程序包 com.walker.web
接口 UserOnlineProvider
public interface UserOnlineProvider
用户在线状态提供者接口规范定义。
1.通过该定义,可以根据token获取用户信息
2.判断用户是否存在多个(相同)账号同时登录
3.判断是否存在同一用户在不同设备上登录
4.更新(或删除)用户登录缓存信息
- 作者:
- 时克英
-
方法概要
修饰符和类型方法说明booleancacheUserPrincipal(String token, UserPrincipal<?> userPrincipal) 已过时。booleancacheUserPrincipal(String token, UserPrincipal<?> userPrincipal, long expiredMinutes) 缓存一个用户登录凭证与token关联信息getUserPrincipal(String token) 根据token返回用户登录凭证对象booleanremoveUserPrincipal(String token) 删除用户缓存登录信息。boolean更新用户访问时间
-
方法详细资料
-
getUserPrincipal
根据token返回用户登录凭证对象- 参数:
token-- 返回:
-
cacheUserPrincipal
已过时。缓存一个用户登录凭证与token关联信息- 参数:
token-userPrincipal-- 返回:
-
cacheUserPrincipal
缓存一个用户登录凭证与token关联信息- 参数:
token-userPrincipal-expiredMinutes- token对应用户登录,缓存失效分钟。- 返回:
-
updateUserPrincipalTimeStamp
更新用户访问时间- 参数:
token-- 返回:
-
removeUserPrincipal
删除用户缓存登录信息。- 参数:
token- 客户端存储的token,其实目前是 'uuid'- 返回:
-