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 Details

  • Constructor Details

    • StandardAuthenticationHandlers

      public StandardAuthenticationHandlers()
  • Method Details

    • setMainRoute

      public void setMainRoute(String mainRoute)
    • setLoginRoute

      public void setLoginRoute(String loginRoute)
    • handleAuthenticationResult

      public boolean handleAuthenticationResult(AuthenticationResult result)
      Description copied from interface: AuthenticationResultHandler
      Called with the result of the authentication attempt.
      Specified by:
      handleAuthenticationResult in interface AuthenticationResultHandler
      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: RouteAccessDeniedHandler
      Called after a fully authenticated user has been denied access to a route.
      Specified by:
      handleAccessDenied in interface RouteAccessDeniedHandler
      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)