Class RestAuthFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.erudika.para.server.security.RestAuthFilter
All Implemented Interfaces:
jakarta.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.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class RestAuthFilter extends org.springframework.web.filter.GenericFilterBean implements org.springframework.beans.factory.InitializingBean
Authenticates API access for App and User objects.
Author:
Alex Bogdanovski [alex@erudika.com]
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
    Default constructor.
    RestAuthFilter(boolean apiSecurityEnabled)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain)
    Authenticates an application or user or guest.

    Methods inherited from class org.springframework.web.filter.GenericFilterBean Link icon

    afterPropertiesSet, destroy, getEnvironment, getFilterConfig, init, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object Link icon

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.beans.factory.InitializingBean Link icon

    afterPropertiesSet
  • Constructor Details Link icon

    • RestAuthFilter Link icon

      public RestAuthFilter()
      Default constructor.
    • RestAuthFilter Link icon

      public RestAuthFilter(boolean apiSecurityEnabled)
      Parameters:
      apiSecurityEnabled - true if API security is enabled
  • Method Details Link icon

    • doFilter Link icon

      public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Authenticates an application or user or guest.
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Parameters:
      req - a request
      res - a response
      chain - filter chain
      Throws:
      IOException - ex
      jakarta.servlet.ServletException - ex