Package com.vaadin.flow.spring
Class SpringViewAccessChecker
java.lang.Object
com.vaadin.flow.server.auth.ViewAccessChecker
com.vaadin.flow.spring.SpringViewAccessChecker
- All Implemented Interfaces:
BeforeEnterListener
,BeforeEnterHandler
,Serializable
@Deprecated(forRemoval=true,
since="24.3")
public class SpringViewAccessChecker
extends ViewAccessChecker
Deprecated, for removal: This API element is subject to removal in a future version.
A Spring specific view access checker that falls back to Spring mechanisms
when the generic mechanisms do not work.
- See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.server.auth.ViewAccessChecker
SESSION_STORED_REDIRECT, SESSION_STORED_REDIRECT_ABSOLUTE
-
Constructor Summary
ConstructorsConstructorDescriptionSpringViewAccessChecker
(AccessAnnotationChecker accessAnnotationChecker) Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance with the given annotation checker. -
Method Summary
Modifier and TypeMethodDescriptionprotected Principal
getPrincipal
(VaadinRequest request) Deprecated, for removal: This API element is subject to removal in a future version.Gets the principal for the currently logged in user.getRolesChecker
(VaadinRequest request) Deprecated, for removal: This API element is subject to removal in a future version.Gets a function for checking roles for the currently logged in user.Methods inherited from class com.vaadin.flow.server.auth.ViewAccessChecker
beforeEnter, checkAccess, createNavigationContext, enable, getAccessDeniedException, setLoginView, setLoginView
-
Constructor Details
-
SpringViewAccessChecker
Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance with the given annotation checker. The created instance is disabled by default.- Parameters:
accessAnnotationChecker
- the annotation checker to use- See Also:
-
-
Method Details
-
getPrincipal
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ViewAccessChecker
Gets the principal for the currently logged in user.- Overrides:
getPrincipal
in classViewAccessChecker
- Parameters:
request
- the current request ornull
if no request is in progress (e.g. in a background thread)- Returns:
- a representation of the currently logged in user or
null
if no user is currently logged in
-
getRolesChecker
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from class:ViewAccessChecker
Gets a function for checking roles for the currently logged in user.- Overrides:
getRolesChecker
in classViewAccessChecker
- Parameters:
request
- the current request ornull
if no request is in progress (e.g. in a background thread)- Returns:
- a function which takes a role name and returns
true
if the user is included in that role
-
NavigationAccessControl
.