Package com.vaadin.flow.spring.security
Class SpringAccessPathChecker
java.lang.Object
com.vaadin.flow.spring.security.SpringAccessPathChecker
- All Implemented Interfaces:
AccessPathChecker,Serializable
A Spring specific route path access checker that delegates the check to
Spring Security.
It is used in combination with
RoutePathAccessChecker to provide
path-based security to Flow
NavigationAccessControl.
To enable it, define a
NavigationAccessControlConfigurer bean,
configured using
NavigationAccessControlConfigurer.withRoutePathAccessChecker()
method.
@Bean
NavigationAccessControlConfigurer navigationAccessControlConfigurer() {
return new NavigationAccessControlConfigurer()
.withRoutePathAccessChecker().withLoginView(LoginView.class);
}
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSpringAccessPathChecker(org.springframework.security.web.access.WebInvocationPrivilegeEvaluator evaluator) Creates a new instance that uses the givenWebInvocationPrivilegeEvaluatorto check path permissions.SpringAccessPathChecker(org.springframework.security.web.access.WebInvocationPrivilegeEvaluator evaluator, String urlMapping) Creates a new instance that uses the givenWebInvocationPrivilegeEvaluatorto check path permissions. -
Method Summary
-
Constructor Details
-
SpringAccessPathChecker
public SpringAccessPathChecker(org.springframework.security.web.access.WebInvocationPrivilegeEvaluator evaluator) Creates a new instance that uses the givenWebInvocationPrivilegeEvaluatorto check path permissions.- Parameters:
evaluator- evaluator to check path permissions.
-
SpringAccessPathChecker
public SpringAccessPathChecker(org.springframework.security.web.access.WebInvocationPrivilegeEvaluator evaluator, String urlMapping) Creates a new instance that uses the givenWebInvocationPrivilegeEvaluatorto check path permissions. It applies the given Vaadin servlet url mapping to the input path before delegating the check to the evaluator.- Parameters:
evaluator- evaluator to check path permissions.urlMapping- Vaadin servlet url mapping
-
-
Method Details
-
hasAccess
- Specified by:
hasAccessin interfaceAccessPathChecker
-