类 DefaultAuthorizationInterceptor
java.lang.Object
org.ssssssss.magicapi.core.interceptor.DefaultAuthorizationInterceptor
- 所有已实现的接口:
AuthorizationInterceptor
默认UI鉴权实现
- 作者:
- mxd
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.ssssssss.magicapi.core.interceptor.AuthorizationInterceptor
allowVisit, allowVisit, allowVisit, logout, refreshToken
-
字段详细资料
-
requireLogin
private final boolean requireLogin -
validToken
-
configMagicUser
-
-
构造器详细资料
-
DefaultAuthorizationInterceptor
-
-
方法详细资料
-
requireLogin
public boolean requireLogin()从接口复制的说明:AuthorizationInterceptor是否需要登录- 指定者:
requireLogin在接口中AuthorizationInterceptor- 返回:
- true 需要登录, false 不需要登录
-
getUserByToken
从接口复制的说明:AuthorizationInterceptor根据Token获取User对象- 指定者:
getUserByToken在接口中AuthorizationInterceptor- 参数:
token- token值- 返回:
- 登录成功后返回MagicUser对象
- 抛出:
MagicLoginException- 登录失败抛出
-
login
从接口复制的说明:AuthorizationInterceptor根据用户名,密码登录- 指定者:
login在接口中AuthorizationInterceptor- 参数:
username- 用户名password- 密码- 返回:
- 登录成功后返回MagicUser对象
- 抛出:
MagicLoginException- 登录失败抛出
-