Package com.wavemaker.runtime.security
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
ConstructorsConstructorDescriptionJSONExceptionTranslationFilter(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidsendStartAuthentication(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, setThrowableAnalyzerMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
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:
sendStartAuthenticationin classorg.springframework.security.web.access.ExceptionTranslationFilter- Throws:
jakarta.servlet.ServletExceptionIOException
-