Class TenantAwareTenantIdentifierFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.apache.fineract.infrastructure.security.filter.TenantAwareTenantIdentifierFilter
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 TenantAwareTenantIdentifierFilter extends org.springframework.web.filter.GenericFilterBean
This filter is responsible for extracting multi-tenant from the request and setting Cross-Origin details to response. If multi-tenant are valid, the details of the tenant are stored in FineractPlatformTenant and stored in a ThreadLocal variable for this request using ThreadLocalContextUtil. If multi-tenant are invalid, a http error response is returned. Used to support Oauth2 authentication and the service is loaded only when "oauth" profile is active.
  • Field Summary

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

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain)
     

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

    addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TenantAwareTenantIdentifierFilter

      public TenantAwareTenantIdentifierFilter()
  • Method Details

    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException
      Throws:
      IOException
      jakarta.servlet.ServletException