Package org.springframework.security.web.access.intercept

# Class RequestMatcherDelegatingAuthorizationManager

java.lang.Object
org.springframework.security.web.access.intercept.RequestMatcherDelegatingAuthorizationManager

All Implemented Interfaces:
  `org.springframework.security.authorization.AuthorizationManager<jakarta.servlet.http.HttpServletRequest>`

public final class RequestMatcherDelegatingAuthorizationManager extends Object implements org.springframework.security.authorization.AuthorizationManager<jakarta.servlet.http.HttpServletRequest>
An `AuthorizationManager` which delegates to a specific `AuthorizationManager` based on a `RequestMatcher` evaluation.

Since:
  5.5

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`RequestMatcherDelegatingAuthorizationManager.Builder`
A builder for `RequestMatcherDelegatingAuthorizationManager`.

## Method Summary

Modifier and Type
Method
Description
`static RequestMatcherDelegatingAuthorizationManager.Builder`
`builder()`
Creates a builder for `RequestMatcherDelegatingAuthorizationManager`.
`org.springframework.security.authorization.AuthorizationDecision`
`check(Supplier<org.springframework.security.core.Authentication> authentication, jakarta.servlet.http.HttpServletRequest request)`
Deprecated.
please use `AuthorizationManager.authorize(Supplier, Object)` instead

### 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

`authorize, verify`

## Method Details

### check

@Deprecated public org.springframework.security.authorization.AuthorizationDecision check(Supplier<org.springframework.security.core.Authentication> authentication, jakarta.servlet.http.HttpServletRequest request)
Deprecated.
please use `AuthorizationManager.authorize(Supplier, Object)` instead
Delegates to a specific `AuthorizationManager` based on a `RequestMatcher` evaluation.

Specified by:
  `check` in interface `org.springframework.security.authorization.AuthorizationManager<jakarta.servlet.http.HttpServletRequest>`
Parameters:
  `authentication` - the `Supplier` of the `Authentication` to check
  `request` - the `HttpServletRequest` to check
Returns:
  an `AuthorizationDecision`. If there is no `RequestMatcher` matching the request, or the `AuthorizationManager` could not decide, then null is returned

### builder

public static RequestMatcherDelegatingAuthorizationManager.Builder builder()
Creates a builder for `RequestMatcherDelegatingAuthorizationManager`.

Returns:
  the new `RequestMatcherDelegatingAuthorizationManager.Builder` instance