Class ExceptionTranslationFilter
java.lang.Object
com.codename1.backend.security.ExceptionTranslationFilter
- All Implemented Interfaces:
SecurityFilter
Turns the security exceptions thrown by what follows it -- the authorization rules, a controller, a service the controller calls -- into answers.
- An
AuthenticationExceptiongoes to theAuthenticationEntryPoint: a 401 with a challenge, or a redirect to the login page. - An
AccessDeniedExceptionfor an anonymous caller goes there too, after the address is remembered, because the remedy is to sign in. - An
AccessDeniedExceptionfor a signed-in caller goes to theAccessDeniedHandler: 403.
Anything else is not this filter's and is thrown on.
-
Method Summary
Modifier and TypeMethodDescriptiondoFilter(HttpServer.Request request, FilterChain chain) The answer torequest; null when nothing under the chain routes it, which the server answers 404.
-
Method Details
-
doFilter
Description copied from interface:SecurityFilterThe answer torequest; null when nothing under the chain routes it, which the server answers 404.- Specified by:
doFilterin interfaceSecurityFilter- Throws:
Exception
-