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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intORDERTheorderused for this handler.
-
Constructor Summary
Constructors Constructor Description StandardAuthenticationHandlers()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleAccessDenied(com.vaadin.flow.router.BeforeEnterEvent event)Called after a fully authenticated user has been denied access to a route.booleanhandleAuthenticationResult(AuthenticationResult result)Called 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 Detail
-
ORDER
public static final int ORDER
Theorderused for this handler.- See Also:
- Constant Field Values
-
-
Method Detail
-
setMainRoute
public void setMainRoute(String mainRoute)
-
setLoginRoute
public void setLoginRoute(String loginRoute)
-
handleAuthenticationResult
public boolean handleAuthenticationResult(AuthenticationResult result)
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
public static void storeOriginalTarget(com.vaadin.flow.component.UI ui, String originalTarget)
-
recallOriginalTarget
public static String recallOriginalTarget(com.vaadin.flow.component.UI ui)
-
-