Class RestAuthFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
com.erudika.para.server.security.RestAuthFilter
All Implemented Interfaces:
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.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 [[email protected]]
  • Constructor Summary

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

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

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

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

    Methods inherited from class java.lang.Object

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

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

    afterPropertiesSet
  • Constructor Details

    • RestAuthFilter

      public RestAuthFilter()
      Default constructor.
    • RestAuthFilter

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

    • doFilter

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