Class OAuth2DynamicErrorHandler
java.lang.Object
sk.iway.iwcm.system.spring.oauth2.OAuth2DynamicErrorHandler
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationFailureHandler
public class OAuth2DynamicErrorHandler
extends Object
implements org.springframework.security.web.authentication.AuthenticationFailureHandler
Dynamic OAuth2 Error Handler that processes errors during OAuth2 authentication.
Based on session attribute decides whether to redirect to admin or user login page.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception)
-
Constructor Details
-
OAuth2DynamicErrorHandler
public OAuth2DynamicErrorHandler()
-
-
Method Details
-
onAuthenticationFailure
public void onAuthenticationFailure(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException exception) throws IOException, jakarta.servlet.ServletException - Specified by:
onAuthenticationFailurein interfaceorg.springframework.security.web.authentication.AuthenticationFailureHandler- Throws:
IOExceptionjakarta.servlet.ServletException
-