public class SavedRequestAwareVaadinAuthenticationSuccessHandler extends VaadinUrlAuthenticationSuccessHandler
VaadinRedirectStrategy which may have been stored in
the session by the ExceptionTranslationFilter. When such a request is intercepted and requires authentication,
the request data is stored to record the original destination before the authentication process commenced, and to
allow the request to be reconstructed when a redirect to the same URL occurs. This class is responsible for
performing the redirect to the original URL if appropriate.
Following a successful authentication, it decides on the redirect destination, based on the following scenarios:
alwaysUseDefaultTargetUrl property is set to true, the defaultTargetUrl
will be used for the destination. Any DefaultSavedRequest stored in the session will be
removed.
targetUrlParameter has been set on the request, the value will be used as the destination.
Any DefaultSavedRequest will again be removed.
SavedRequest is found in the RequestCache (as set by the ExceptionTranslationFilter to
record the original destination before the authentication process commenced), a redirect will be performed to the
Url of that original destination. The SavedRequest object will remain cached and be picked up
when the redirected request is received.
SavedRequest is found, it will delegate to the base class.
VaadinAuthenticationSuccessHandler.NullHandlerhttp, redirectStrategy| Constructor and Description |
|---|
SavedRequestAwareVaadinAuthenticationSuccessHandler(HttpService http,
VaadinRedirectStrategy redirectStrategy,
String defaultTargetUrl) |
| Modifier and Type | Method and Description |
|---|---|
void |
onAuthenticationSuccess(Authentication authentication)
Called when a user has been successfully authenticated.
|
void |
setRequestCache(RequestCache requestCache) |
clearAuthenticationAttributesdetermineTargetUrl, getDefaultTargetUrl, getTargetUrlParameter, handle, isAlwaysUseDefaultTargetUrl, setAlwaysUseDefaultTargetUrl, setDefaultTargetUrl, setTargetUrlParameter, setUseRefererpublic SavedRequestAwareVaadinAuthenticationSuccessHandler(HttpService http, VaadinRedirectStrategy redirectStrategy, String defaultTargetUrl)
public void onAuthenticationSuccess(Authentication authentication) throws Exception
VaadinAuthenticationSuccessHandleronAuthenticationSuccess in interface VaadinAuthenticationSuccessHandleronAuthenticationSuccess in class VaadinUrlAuthenticationSuccessHandlerauthentication - the Authentication object which was created during the authentication process.Exceptionpublic void setRequestCache(RequestCache requestCache)
Copyright © 2017. All rights reserved.