类 MyLoginFilter

  • 所有已实现的接口:
    javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.EnvironmentAware, org.springframework.context.MessageSourceAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

    public class MyLoginFilter
    extends org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
    • 字段概要

      • 从类继承的字段 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter

        SPRING_SECURITY_FORM_PASSWORD_KEY, SPRING_SECURITY_FORM_USERNAME_KEY
      • 从类继承的字段 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

        authenticationDetailsSource, eventPublisher, messages
      • 从类继承的字段 org.springframework.web.filter.GenericFilterBean

        logger
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      org.springframework.security.core.Authentication attemptAuthentication​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)  
      protected void successfulAuthentication​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain, org.springframework.security.core.Authentication authResult)  
      protected void unsuccessfulAuthentication​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException failed)  
      • 从类继承的方法 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter

        getPasswordParameter, getUsernameParameter, obtainPassword, obtainUsername, setDetails, setPasswordParameter, setPostOnly, setUsernameParameter
      • 从类继承的方法 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter

        afterPropertiesSet, doFilter, getAllowSessionCreation, getAuthenticationManager, getFailureHandler, getRememberMeServices, getSuccessHandler, requiresAuthentication, setAllowSessionCreation, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setContinueChainBeforeSuccessfulAuthentication, setFilterProcessesUrl, setMessageSource, setRememberMeServices, setRequiresAuthenticationRequestMatcher, setSecurityContextRepository, setSessionAuthenticationStrategy
      • 从类继承的方法 org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
    • 构造器详细资料

      • MyLoginFilter

        public MyLoginFilter​(org.springframework.security.authentication.AuthenticationManager authenticationManager,
                             Jwt jwt,
                             SecurityLoginHandler loginHandler,
                             SecurityJwtProperties securityJwtProperties)
    • 方法详细资料

      • attemptAuthentication

        public org.springframework.security.core.Authentication attemptAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                                                      javax.servlet.http.HttpServletResponse response)
                                                                               throws org.springframework.security.core.AuthenticationException
        覆盖:
        attemptAuthentication 在类中 org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter
        抛出:
        org.springframework.security.core.AuthenticationException
      • successfulAuthentication

        protected void successfulAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                javax.servlet.http.HttpServletResponse response,
                                                javax.servlet.FilterChain chain,
                                                org.springframework.security.core.Authentication authResult)
                                         throws IOException,
                                                javax.servlet.ServletException
        覆盖:
        successfulAuthentication 在类中 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
        抛出:
        IOException
        javax.servlet.ServletException
      • unsuccessfulAuthentication

        protected void unsuccessfulAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                  javax.servlet.http.HttpServletResponse response,
                                                  org.springframework.security.core.AuthenticationException failed)
                                           throws IOException,
                                                  javax.servlet.ServletException
        覆盖:
        unsuccessfulAuthentication 在类中 org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
        抛出:
        IOException
        javax.servlet.ServletException