public class AuthFilter
extends java.lang.Object
implements javax.servlet.Filter
| 限定符和类型 | 字段和说明 |
|---|---|
private AuthConfigs |
authConfigs |
private ControllerMethodsCache |
methodsCache |
private HttpProtocolAuthService |
protocolAuthService |
| 构造器和说明 |
|---|
AuthFilter(AuthConfigs authConfigs,
ControllerMethodsCache methodsCache) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
private void |
injectIdentityId(javax.servlet.http.HttpServletRequest request,
com.alibaba.nacos.plugin.auth.api.IdentityContext identityContext)
Set identity id to request session, make sure some actual logic can get identity information.
|
private final AuthConfigs authConfigs
private final ControllerMethodsCache methodsCache
private final HttpProtocolAuthService protocolAuthService
public AuthFilter(AuthConfigs authConfigs, ControllerMethodsCache methodsCache)
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws java.io.IOException,
javax.servlet.ServletException
doFilter 在接口中 javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletExceptionprivate void injectIdentityId(javax.servlet.http.HttpServletRequest request,
com.alibaba.nacos.plugin.auth.api.IdentityContext identityContext)
May be replaced with whole identityContext.
request - http requestidentityContext - identity contextCopyright © 2018–2022 Alibaba Group. All rights reserved.