Package tech.jhipster.security
Class AjaxAuthenticationFailureHandler
- java.lang.Object
-
- org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
-
- tech.jhipster.security.AjaxAuthenticationFailureHandler
-
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler
public class AjaxAuthenticationFailureHandler extends org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
Returns a 401 error code (Unauthorized) to the client, when Ajax authentication fails.
-
-
Field Summary
Fields Modifier and Type Field Description static String
UNAUTHORIZED_MESSAGE
ConstantUNAUTHORIZED_MESSAGE="Authentication failed"
-
Constructor Summary
Constructors Constructor Description AjaxAuthenticationFailureHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onAuthenticationFailure(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:
onAuthenticationFailure
in interfaceorg.springframework.security.web.authentication.AuthenticationFailureHandler
- Overrides:
onAuthenticationFailure
in classorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler
- Throws:
IOException
javax.servlet.ServletException
-
-