public class VaadinSavedRequestAwareAuthenticationSuccessHandler
extends org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler
SavedRequestAwareAuthenticationSuccessHandler that
writes a different return value for a Fusion TypeScript client.
This class acts as a SavedRequestAwareAuthenticationSuccessHandler
unless the request from the client contains a "source: typescript" header.
If the header is present, it sends a return value that is an "ok" instead of a "redirect" response. This is so that the TypeScript caller is able to read the returned values. Additionally it sends the saved URL separately so the client can decide where to redirect if no URL was saved.
| Modifier and Type | Class and Description |
|---|---|
static class |
VaadinSavedRequestAwareAuthenticationSuccessHandler.RedirectStrategy
Redirect strategy used by
VaadinSavedRequestAwareAuthenticationSuccessHandler. |
| Constructor and Description |
|---|
VaadinSavedRequestAwareAuthenticationSuccessHandler()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication) |
void |
setRequestCache(org.springframework.security.web.savedrequest.RequestCache requestCache) |
clearAuthenticationAttributesdetermineTargetUrl, determineTargetUrl, getDefaultTargetUrl, getRedirectStrategy, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setRedirectStrategy, setTargetUrlParameter, setUseRefererpublic VaadinSavedRequestAwareAuthenticationSuccessHandler()
public void onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
throws javax.servlet.ServletException,
IOException
onAuthenticationSuccess in interface org.springframework.security.web.authentication.AuthenticationSuccessHandleronAuthenticationSuccess in class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandlerjavax.servlet.ServletExceptionIOExceptionpublic void setRequestCache(org.springframework.security.web.savedrequest.RequestCache requestCache)
setRequestCache in class org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandlerCopyright © 2021 Vaadin Ltd. All Rights Reserved.