Class StandardAuthenticationHandlers
java.lang.Object
de.codecamp.vaadin.security.spring.authentication.StandardAuthenticationHandlers
- All Implemented Interfaces:
RouteAccessDeniedHandler,AuthenticationResultHandler,Serializable
@Order(2147483647)
public class StandardAuthenticationHandlers
extends Object
implements AuthenticationResultHandler, RouteAccessDeniedHandler
Provides parts of the default behavior for standard authentication.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleAccessDenied(com.vaadin.flow.router.BeforeEnterEvent event) Called after a fully authenticated user has been denied access to a route.booleanCalled with the result of the authentication attempt.static StringrecallOriginalTarget(com.vaadin.flow.component.UI ui) voidsetLoginRoute(String loginRoute) voidsetMainRoute(String mainRoute) static voidstoreOriginalTarget(com.vaadin.flow.component.UI ui, String originalTarget)
-
Field Details
-
ORDER
public static final int ORDERTheorderused for this handler.- See Also:
-
-
Constructor Details
-
StandardAuthenticationHandlers
public StandardAuthenticationHandlers()
-
-
Method Details
-
setMainRoute
-
setLoginRoute
-
handleAuthenticationResult
Description copied from interface:AuthenticationResultHandlerCalled with the result of the authentication attempt.- Specified by:
handleAuthenticationResultin interfaceAuthenticationResultHandler- Parameters:
result- the authentication result- Returns:
- whether the result should be considered handled and no further handler should be consulted; this can also prevent the default navigation after successfully logging in when on the login view
-
handleAccessDenied
public void handleAccessDenied(com.vaadin.flow.router.BeforeEnterEvent event) Description copied from interface:RouteAccessDeniedHandlerCalled after a fully authenticated user has been denied access to a route.- Specified by:
handleAccessDeniedin interfaceRouteAccessDeniedHandler- Parameters:
event- navigation event with event details while trying to access the secured route
-
storeOriginalTarget
-
recallOriginalTarget
-