类 AuthFilter

  • 所有已实现的接口:
    javax.servlet.Filter

    public class AuthFilter
    extends java.lang.Object
    implements javax.servlet.Filter
    Unified filter to handle authentication and authorization.
    从以下版本开始:
    1.2.0
    作者:
    nkorange
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      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.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 javax.servlet.Filter

        destroy, init
    • 字段详细资料

      • authConfigs

        private final com.alibaba.nacos.auth.config.AuthConfigs authConfigs
      • protocolAuthService

        private final com.alibaba.nacos.auth.HttpProtocolAuthService protocolAuthService
    • 构造器详细资料

      • AuthFilter

        public AuthFilter​(com.alibaba.nacos.auth.config.AuthConfigs authConfigs,
                          ControllerMethodsCache methodsCache)
    • 方法详细资料

      • doFilter

        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.Filter
        抛出:
        java.io.IOException
        javax.servlet.ServletException
      • injectIdentityId

        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.

        May be replaced with whole identityContext.

        参数:
        request - http request
        identityContext - identity context