Package io.github.jhipster.security
Class AjaxAuthenticationFailureHandler
- java.lang.Object
-
- org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
-
- io.github.jhipster.security.AjaxAuthenticationFailureHandler
-
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler
public class AjaxAuthenticationFailureHandler extends org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandlerReturns a 401 error code (Unauthorized) to the client, when Ajax authentication fails.
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNAUTHORIZED_MESSAGEConstantUNAUTHORIZED_MESSAGE="Authentication failed"
-
Constructor Summary
Constructors Constructor Description AjaxAuthenticationFailureHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonAuthenticationFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception)
-
-
-
Field Detail
-
UNAUTHORIZED_MESSAGE
public static final String UNAUTHORIZED_MESSAGE
ConstantUNAUTHORIZED_MESSAGE="Authentication failed"- See Also:
- Constant Field Values
-
-
Method Detail
-
onAuthenticationFailure
public void onAuthenticationFailure(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) throws IOException, javax.servlet.ServletException- Specified by:
onAuthenticationFailurein interfaceorg.springframework.security.web.authentication.AuthenticationFailureHandler- Overrides:
onAuthenticationFailurein classorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler- Throws:
IOExceptionjavax.servlet.ServletException
-
-