Package com.vaadin.flow.spring.security
Class SpringNavigationAccessControl
java.lang.Object
com.vaadin.flow.server.auth.NavigationAccessControl
com.vaadin.flow.spring.security.SpringNavigationAccessControl
- All Implemented Interfaces:
BeforeEnterListener,BeforeEnterHandler,Serializable
A Spring specific navigation access control that falls back to Spring
mechanisms for user retrieval and role checking, when the generic mechanisms
do not work.
In Spring Boot application, a
SpringNavigationAccessControl is
provided by default, but its behavior can be configured by defining a
NavigationAccessControlConfigurer bean.-
Field Summary
Fields inherited from class com.vaadin.flow.server.auth.NavigationAccessControl
SESSION_STORED_REDIRECT, SESSION_STORED_REDIRECT_ABSOLUTE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance with the default view annotation checker and decision resolver.SpringNavigationAccessControl(Collection<NavigationAccessChecker> checkerList, AccessCheckDecisionResolver decisionResolver) Create a new instance with given checkers and decision resolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected PrincipalgetPrincipal(VaadinRequest request) getRolesChecker(VaadinRequest request) Methods inherited from class com.vaadin.flow.server.auth.NavigationAccessControl
beforeEnter, checkAccess, createNavigationContext, getAccessDeniedException, getLoginUrl, getLoginView, getRequestURL, hasAccessChecker, isEnabled, setEnabled, setLoginView, setLoginView
-
Constructor Details
-
SpringNavigationAccessControl
public SpringNavigationAccessControl()Create a new instance with the default view annotation checker and decision resolver. -
SpringNavigationAccessControl
public SpringNavigationAccessControl(Collection<NavigationAccessChecker> checkerList, AccessCheckDecisionResolver decisionResolver) Create a new instance with given checkers and decision resolver.- Parameters:
checkerList- collection of navigation access checker.decisionResolver- the decision resolver.
-
-
Method Details
-
getPrincipal
- Overrides:
getPrincipalin classNavigationAccessControl
-
getRolesChecker
- Overrides:
getRolesCheckerin classNavigationAccessControl
-