public class AuthzDeviceHelper extends BaseHelper
cache, ctx, openAuthLibrary, permLibrary, properties, userDevicesDict| 限定符和类型 | 方法和说明 |
|---|---|
static void |
addDeviceTypesTotalLimit(Collection<String> types,
int total)
每[一种、多种]设备类型设置[共同]的最大登录数(最小为1),超出会挤出最长时间未访问的设备。
|
static void |
addDeviceTypesTotalLimitAt(Object userId,
Collection<String> types,
int total)
每[一种、多种]设备类型设置[共同]的最大登录数(最小为1),超出会挤出最长时间未访问的设备。
|
static void |
changeMaximumTotalDevice(int count)
登录设备总数默不做限制【total为-1不做限制,最小为1】,超出会挤出最长时间未访问的设备。
|
static void |
changeMaximumTotalDeviceAt(Object userId,
int count)
登录设备总数默不做限制【total为-1不做限制,最小为1】,超出会挤出最长时间未访问的设备。
|
static void |
changeMaximumTotalSameTypeDevice(int count)
同类型设备最多登录数 默认 1个【count最小为1】,超出会挤出最长时间未访问的设备。
|
static void |
changeMaximumTotalSameTypeDeviceAt(Object userId,
int count)
同类型设备最多登录数 默认 1个【count最小为1】,超出会挤出最长时间未访问的设备。
|
static boolean |
checkUserIsActive(Object userId,
long ms)
判断某个用户是否【在线/活跃】
|
static boolean |
checkUserIsActive(Object userId,
String time)
判断某个用户是否【在线/活跃】
|
static List<DeviceDetails> |
getActiveDevices(long ms)
所有【在线/活跃】用户详细设备信息
|
static List<DeviceDetails> |
getActiveDevices(String time)
所有【在线/活跃】用户详细设备信息
|
static List<Object> |
getActiveUserIdList(long ms)
所有【在线/活跃】用户Id数组
|
static List<Object> |
getActiveUserIdList(String time)
所有【在线/活跃】用户Id数组
|
static List<DeviceDetails> |
getAllDeviceByUserId(Object userId)
获得指定userId的所有设备信息
|
static List<DeviceDetails> |
getAllDeviceByUserIdAndDeviceType(Object userId,
String deviceType)
获得指定userId的所有设备信息
|
static List<DeviceDetails> |
getAllDeviceFromCurrentUser()
当前访问用户的所有设备
|
static List<Object> |
getAllUserId() |
static Map<Object,List<DeviceDetails>> |
getAllUsersDevices()
查询所有用户信息,一个map userId->设备信息列表
|
static DeviceDetails |
getDeviceByUserIdAndDeviceTypeAndDeviceId(Object userId,
String deviceType,
String deviceId)
获得指定设备信息
|
static List<DeviceCountInfo> |
getOrUpdateDeviceTypesTotalLimit()
获得一个可修改的 DeviceTypesTotalLimit list
count >= 1 or count = -1
|
static List<DeviceCountInfo> |
getOrUpdateDeviceTypesTotalLimitAt(Object userId)
获得一个可修改的 DeviceTypesTotalLimit list
count >= 1 or count = -1
|
@NonNull public static List<DeviceDetails> getActiveDevices(long ms)
ms - 时间间隔(ms)@NonNull public static List<DeviceDetails> getActiveDevices(String time)
time - 时间间隔(ms)@NonNull public static List<Object> getActiveUserIdList(@NonNull String time)
time - 时间间隔@NonNull public static List<Object> getActiveUserIdList(long ms)
ms - 时间间隔(ms)public static boolean checkUserIsActive(@NonNull
Object userId,
@NonNull
String time)
userId - 用户idtime - 时间间隔public static boolean checkUserIsActive(@NonNull
Object userId,
long ms)
userId - 用户idms - 时间间隔(ms)@Nullable public static DeviceDetails getDeviceByUserIdAndDeviceTypeAndDeviceId(@NonNull Object userId, @NonNull String deviceType, @Nullable String deviceId)
userId - 指定userId@NonNull public static List<DeviceDetails> getAllDeviceFromCurrentUser() throws NotLoginException
NotLoginException@NonNull public static List<DeviceDetails> getAllDeviceByUserId(@NonNull Object userId)
userId - 指定userId@NonNull public static List<DeviceDetails> getAllDeviceByUserIdAndDeviceType(@NonNull Object userId, @NonNull String deviceType)
userId - 指定userId@NonNull public static Map<Object,List<DeviceDetails>> getAllUsersDevices()
public static void addDeviceTypesTotalLimit(@NonNull
Collection<String> types,
int total)
throws NotLoginException
types - deviceTypetotal - 数量NotLoginExceptionpublic static void addDeviceTypesTotalLimitAt(@NonNull
Object userId,
@NonNull
Collection<String> types,
int total)
userId - 用户idtypes - deviceTypetotal - 数量public static List<DeviceCountInfo> getOrUpdateDeviceTypesTotalLimitAt(@NonNull Object userId)
userId - 用户idpublic static List<DeviceCountInfo> getOrUpdateDeviceTypesTotalLimit() throws NotLoginException
public static void changeMaximumTotalDevice(int count)
throws NotLoginException
count - 数量NotLoginExceptionpublic static void changeMaximumTotalDeviceAt(@NonNull
Object userId,
int count)
userId - 用户idcount - 数量public static void changeMaximumTotalSameTypeDevice(int count)
throws NotLoginException
count - 数量NotLoginExceptionpublic static void changeMaximumTotalSameTypeDeviceAt(@NonNull
Object userId,
int count)
userId - 用户idcount - 数量Copyright © 2022. All rights reserved.