类 AuthHelper
java.lang.Object
cool.scx.ext.auth.AuthHelper
AuthHelper class.
- 版本:
- 1.15.4
- 作者:
- scx567888
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static booleancheckPassword(String plainPassword, String encryptedPassword) 校验密码static DeviceTypegetDeviceTypeByHeader(io.vertx.ext.web.RoutingContext routingContext) 获取用户的设备static StringgetToken(io.vertx.ext.web.RoutingContext ctx) 根据 设备类型自行判断 获取 tokenstatic StringgetTokenFromCookie(io.vertx.ext.web.RoutingContext routingContext) 根据 cookie 获取 tokenstatic StringgetTokenFromHeader(io.vertx.ext.web.RoutingContext routingContext) 根据 Header 获取 tokenstatic PermsmergePermsModels(List<PermsModel> permsModelList) mergePermsModels.static StringtryGetAuthToken(io.vertx.ext.web.RoutingContext ctx, DeviceType loginDevice) 尝试获取一个可以作为认证的 Token 具体获取方式由设备类型决定
-
构造器详细资料
-
AuthHelper
public AuthHelper()
-
-
方法详细资料
-
getToken
根据 设备类型自行判断 获取 token- 参数:
ctx- aRoutingContextobject- 返回:
- a
Stringobject
-
getDeviceTypeByHeader
获取用户的设备- 参数:
routingContext- aRoutingContextobject- 返回:
- a
-
getTokenFromCookie
根据 cookie 获取 token- 参数:
routingContext- aRoutingContextobject- 返回:
- a
Stringobject
-
getTokenFromHeader
根据 Header 获取 token- 参数:
routingContext- a- 返回:
- a a
-
tryGetAuthToken
public static String tryGetAuthToken(io.vertx.ext.web.RoutingContext ctx, DeviceType loginDevice) throws AuthException 尝试获取一个可以作为认证的 Token 具体获取方式由设备类型决定- 参数:
ctx- aRoutingContextobjectloginDevice- aDeviceTypeobject- 返回:
- a
Stringobject - 抛出:
AuthException- if any.
-
checkPassword
校验密码- 参数:
plainPassword- aencryptedPassword- a- 返回:
- a
-
mergePermsModels
mergePermsModels.
-