类 AbstractTokenHandlerInterceptor<A extends AuthWebProperties>
java.lang.Object
net.guerlab.cloud.auth.webmvc.interceptor.AbstractHandlerInterceptor
net.guerlab.cloud.auth.webmvc.interceptor.AbstractTokenHandlerInterceptor<A>
- 类型参数:
A- 授权配置类型
- 所有已实现的接口:
org.springframework.core.Ordered,org.springframework.web.servlet.HandlerInterceptor
public abstract class AbstractTokenHandlerInterceptor<A extends AuthWebProperties>
extends AbstractHandlerInterceptor
抽象token处理.
- 作者:
- guer
-
字段概要
字段从类继承的字段 net.guerlab.cloud.auth.webmvc.interceptor.AbstractHandlerInterceptor
DEFAULT_ORDER, responseAdvisorProperties从接口继承的字段 org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
构造器概要
构造器构造器说明AbstractTokenHandlerInterceptor(net.guerlab.cloud.web.core.properties.ResponseAdvisorProperties responseAdvisorProperties, A authProperties) -
方法概要
修饰符和类型方法说明protected abstract boolean判断是否处理该token.intgetOrder()protected voidpreHandleWithToken(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.method.HandlerMethod handlerMethod, String token) 获取令牌成功前置处理.protected abstract voidsetTokenInfo(String token) 设置Token信息.从类继承的方法 net.guerlab.cloud.auth.webmvc.interceptor.AbstractHandlerInterceptor
getAnnotation, preHandle, preHandleWithoutToken从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
-
字段详细资料
-
authProperties
授权配置.
-
-
构造器详细资料
-
AbstractTokenHandlerInterceptor
public AbstractTokenHandlerInterceptor(net.guerlab.cloud.web.core.properties.ResponseAdvisorProperties responseAdvisorProperties, A authProperties)
-
-
方法详细资料
-
getOrder
public int getOrder()- 指定者:
getOrder在接口中org.springframework.core.Ordered- 覆盖:
getOrder在类中AbstractHandlerInterceptor
-
preHandleWithToken
protected void preHandleWithToken(jakarta.servlet.http.HttpServletRequest request, org.springframework.web.method.HandlerMethod handlerMethod, String token) 从类复制的说明:AbstractHandlerInterceptor获取令牌成功前置处理.- 覆盖:
preHandleWithToken在类中AbstractHandlerInterceptor- 参数:
request- 请求handlerMethod- 处理方法token- 令牌
-
accept
判断是否处理该token.- 参数:
token- tokenrequest- 请求对象- 返回:
- 是否处理该token
-
setTokenInfo
设置Token信息.- 参数:
token- token
-