Package cn.dev33.satoken.exception
Class NotLoginException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cn.dev33.satoken.exception.SaTokenException
cn.dev33.satoken.exception.NotLoginException
- All Implemented Interfaces:
Serializable
一个异常:代表会话未能通过登录认证校验
- Since:
- 1.10.0
- Author:
- click33
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription代表异常 token 的标志集合static final String表示 token 已被顶下线static final Stringstatic final String默认的提示语static final String表示 token 无效static final Stringstatic final String表示 token 已被踢下线static final Stringstatic final String表示 未按照指定前缀提交 tokenstatic final Stringstatic final String表示未能读取到有效 tokenstatic final Stringstatic final String表示 token 已被冻结static final Stringstatic final String表示 token 已过期static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription获得账号类型getType()获取异常类型static NotLoginExceptionnewInstance(String loginType, String type, String message, String token) 静态方法构建一个 NotLoginExceptionMethods inherited from class cn.dev33.satoken.exception.SaTokenException
getCode, notEmpty, notEmpty, notTrue, notTrue, setCodeMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
NOT_TOKEN
表示未能读取到有效 token- See Also:
-
NOT_TOKEN_MESSAGE
- See Also:
-
INVALID_TOKEN
表示 token 无效- See Also:
-
INVALID_TOKEN_MESSAGE
- See Also:
-
TOKEN_TIMEOUT
表示 token 已过期- See Also:
-
TOKEN_TIMEOUT_MESSAGE
- See Also:
-
BE_REPLACED
表示 token 已被顶下线- See Also:
-
BE_REPLACED_MESSAGE
- See Also:
-
KICK_OUT
表示 token 已被踢下线- See Also:
-
KICK_OUT_MESSAGE
- See Also:
-
TOKEN_FREEZE
表示 token 已被冻结- See Also:
-
TOKEN_FREEZE_MESSAGE
- See Also:
-
NO_PREFIX
表示 未按照指定前缀提交 token- See Also:
-
NO_PREFIX_MESSAGE
- See Also:
-
DEFAULT_MESSAGE
默认的提示语- See Also:
-
ABNORMAL_LIST
代表异常 token 的标志集合
-
-
Constructor Details
-
NotLoginException
构造方法创建一个- Parameters:
message- 异常消息loginType- 账号类型type- 类型
-
-
Method Details
-
getType
获取异常类型- Returns:
- 异常类型
-
getLoginType
获得账号类型- Returns:
- 账号类型
-
newInstance
public static NotLoginException newInstance(String loginType, String type, String message, String token) 静态方法构建一个 NotLoginException- Parameters:
loginType- 账号类型type- 未登录场景值message- 异常描述信息token- 引起异常的 token 值,可不填,如果填了会拼接到异常描述信息后面- Returns:
- 构建完毕的异常对象
-