Class RequestMatcherDelegatingAuthorizationManager
java.lang.Object
org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager
- All Implemented Interfaces:
AuthorizationManager<jakarta.servlet.http.HttpServletRequest>
public final class RequestMatcherDelegatingAuthorizationManager
extends Object
implements AuthorizationManager<jakarta.servlet.http.HttpServletRequest>
An
AuthorizationManager
which delegates to a specific
AuthorizationManager
based on a RequestMatcher
evaluation.- Since:
- 5.5
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A builder forRequestMatcherDelegatingAuthorizationManager
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forRequestMatcherDelegatingAuthorizationManager
.check
(Supplier<Authentication> authentication, jakarta.servlet.http.HttpServletRequest request) Delegates to a specificAuthorizationManager
based on aRequestMatcher
evaluation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.authorization.AuthorizationManager
verify
-
Method Details
-
check
public AuthorizationDecision check(Supplier<Authentication> authentication, jakarta.servlet.http.HttpServletRequest request) Delegates to a specificAuthorizationManager
based on aRequestMatcher
evaluation.- Specified by:
check
in interfaceAuthorizationManager<jakarta.servlet.http.HttpServletRequest>
- Parameters:
authentication
- theSupplier
of theAuthentication
to checkrequest
- theHttpServletRequest
to check- Returns:
- an
AuthorizationDecision
. If there is noRequestMatcher
matching the request, or theAuthorizationManager
could not decide, then null is returned
-
builder
Creates a builder forRequestMatcherDelegatingAuthorizationManager
.- Returns:
- the new
RequestMatcherDelegatingAuthorizationManager.Builder
instance
-