Package com.vaadin.flow.server.auth
Interface AccessPathChecker
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
SpringAccessPathChecker
Checks if a user has access to a given route path.
The path to check is relative to the Vaadin application and does not contain any container specific details such as context or servlet path.
In addition, the path is never null and never starts with a "/" character.
Implementors of this interface are meant to be used in combination with
RoutePathAccessChecker
.- See Also:
-
Method Summary
-
Method Details
-
hasAccess
Checks if the user defined by the givenPrincipal
and role checker has access to the given path.The
path
is relative to the Vaadin application and does not contain any container specific details such as context or servlet path.The
path
is never null and never starts with a "/" character.- Parameters:
path
- the path to check access toprincipal
- the principal of the userroleChecker
- a function that can answer if a user has a given role- Returns:
true
if the user has access to the given path,false
otherwise.
-