Class JSONExceptionTranslationFilter

java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.access.ExceptionTranslationFilter
com.wavemaker.runtime.security.JSONExceptionTranslationFilter
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.context.MessageSourceAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

public class JSONExceptionTranslationFilter extends org.springframework.security.web.access.ExceptionTranslationFilter
Extends from the normal ExceptionTranslationFilter, this filter will send 403 if the request is a JSON service request.
  • Field Summary

    Fields inherited from class org.springframework.security.web.access.ExceptionTranslationFilter

    messages
  • Constructor Summary

    Constructors
    Constructor
    Description
    JSONExceptionTranslationFilter(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    sendStartAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain, org.springframework.security.core.AuthenticationException reason)
     

    Methods inherited from class org.springframework.security.web.access.ExceptionTranslationFilter

    afterPropertiesSet, doFilter, getAuthenticationEntryPoint, getAuthenticationTrustResolver, setAccessDeniedHandler, setAuthenticationTrustResolver, setMessageSource, setSecurityContextHolderStrategy, setThrowableAnalyzer

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

    addRequiredProperty, 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

    • JSONExceptionTranslationFilter

      public JSONExceptionTranslationFilter(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
  • Method Details

    • sendStartAuthentication

      protected void sendStartAuthentication(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain chain, org.springframework.security.core.AuthenticationException reason) throws jakarta.servlet.ServletException, IOException
      Overrides:
      sendStartAuthentication in class org.springframework.security.web.access.ExceptionTranslationFilter
      Throws:
      jakarta.servlet.ServletException
      IOException