public class SaTokenInterceptor extends Object implements cn.dev33.satoken.filter.SaFilter, org.noear.solon.core.route.RouterInterceptor
| Modifier and Type | Field and Description |
|---|---|
protected cn.dev33.satoken.filter.SaFilterAuthStrategy |
auth
认证函数:每次请求执行
|
protected cn.dev33.satoken.filter.SaFilterAuthStrategy |
beforeAuth
前置函数:在每次[认证函数]之前执行
|
protected cn.dev33.satoken.filter.SaFilterErrorStrategy |
error
异常处理函数:每次[认证函数]发生异常时执行此函数
|
protected List<String> |
excludeList
放行路由
|
protected List<String> |
includeList
拦截路由
|
boolean |
isAnnotation
是否打开注解鉴权
|
| Constructor and Description |
|---|
SaTokenInterceptor() |
| Modifier and Type | Method and Description |
|---|---|
SaTokenInterceptor |
addExclude(String... paths)
添加 [放行路由]
|
SaTokenInterceptor |
addInclude(String... paths)
添加 [拦截路由]
|
void |
doIntercept(org.noear.solon.core.handle.Context ctx,
org.noear.solon.core.handle.Handler mainHandler,
org.noear.solon.core.route.RouterInterceptorChain chain) |
List<String> |
getExcludeList()
获取 [放行路由] 集合
|
List<String> |
getIncludeList()
获取 [拦截路由] 集合
|
SaTokenInterceptor |
setAuth(cn.dev33.satoken.filter.SaFilterAuthStrategy auth)
写入[认证函数]: 每次请求执行
|
SaTokenInterceptor |
setBeforeAuth(cn.dev33.satoken.filter.SaFilterAuthStrategy beforeAuth)
写入[前置函数]:在每次[认证函数]之前执行
|
SaTokenInterceptor |
setError(cn.dev33.satoken.filter.SaFilterErrorStrategy error)
写入[异常处理函数]:每次[认证函数]发生异常时执行此函数
|
SaTokenInterceptor |
setExcludeList(List<String> pathList)
写入 [放行路由] 集合
|
SaTokenInterceptor |
setIncludeList(List<String> pathList)
写入 [拦截路由] 集合
|
public boolean isAnnotation
protected cn.dev33.satoken.filter.SaFilterAuthStrategy auth
protected cn.dev33.satoken.filter.SaFilterErrorStrategy error
protected cn.dev33.satoken.filter.SaFilterAuthStrategy beforeAuth
public SaTokenInterceptor addInclude(String... paths)
addInclude in interface cn.dev33.satoken.filter.SaFilterpaths - 路由public SaTokenInterceptor addExclude(String... paths)
addExclude in interface cn.dev33.satoken.filter.SaFilterpaths - 路由public SaTokenInterceptor setIncludeList(List<String> pathList)
setIncludeList in interface cn.dev33.satoken.filter.SaFilterpathList - 路由集合public SaTokenInterceptor setExcludeList(List<String> pathList)
setExcludeList in interface cn.dev33.satoken.filter.SaFilterpathList - 路由集合public SaTokenInterceptor setAuth(cn.dev33.satoken.filter.SaFilterAuthStrategy auth)
setAuth in interface cn.dev33.satoken.filter.SaFilterauth - see notepublic SaTokenInterceptor setError(cn.dev33.satoken.filter.SaFilterErrorStrategy error)
setError in interface cn.dev33.satoken.filter.SaFiltererror - see notepublic SaTokenInterceptor setBeforeAuth(cn.dev33.satoken.filter.SaFilterAuthStrategy beforeAuth)
setBeforeAuth in interface cn.dev33.satoken.filter.SaFilterbeforeAuth - see notepublic void doIntercept(org.noear.solon.core.handle.Context ctx,
org.noear.solon.core.handle.Handler mainHandler,
org.noear.solon.core.route.RouterInterceptorChain chain)
throws Throwable
doIntercept in interface org.noear.solon.core.route.RouterInterceptorThrowableCopyright © 2025. All rights reserved.