Interface RouteAccessDeniedHandler

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    StandardAuthenticationHandlers

    @Order(0)
    public interface RouteAccessDeniedHandler
    extends Serializable
    Handles when a fully authenticated user has been denied access to a route, e.g. by navigating to a different route and/or showing an error message. No further attempt to login the user needs to be made here.

    Multiple handlers are possible and will be ordered according to Spring's standard mechanism. Once the first handler has requested to reroute or forward to a different view, no further handlers are considered. When no handler reroutes or forwards, a RouteAccessDeniedException is thrown which could be handled in an error view.

    • Method Detail

      • handleAccessDenied

        void handleAccessDenied​(com.vaadin.flow.router.BeforeEnterEvent event)
        Called after a fully authenticated user has been denied access to a route.
        Parameters:
        event - navigation event with event details while trying to access the secured route