com.vaadin.flow.server.auth.
Interface NavigationAccessChecker
All Superinterfaces:
All Known Implementing Classes:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Checks if a user is allowed to navigate to a specific view.
Implementors of this interface are responsible to analyze a navigation request and decide if the associate user (or anonymous) is granted to access the target view.
The NavigationContext
object provide information about the ongoing
navigation and the current user and its assigned roles.
Based on the context information the navigation access checker must take a decision about the current navigation, that can be one of:
- Allow: the navigation is permitted
- Deny: the navigation is denied
- Reject: the navigation is denied because of a configuration or development mistake
- Neutral: no opinions about the current navigation
NavigationContext
provides the methods to create the above
AccessCheckResult
s.
-
Method Summary
Modifier and TypeMethodDescriptioncheck
(NavigationContext context) Checks if the current user is allowed to access a target view.
-
Method Details