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

# Class RequestMatcherDelegatingAuthorizationManager.Builder

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

Enclosing class:
  RequestMatcherDelegatingAuthorizationManager

public static final class RequestMatcherDelegatingAuthorizationManager.Builder extends Object
A builder for `RequestMatcherDelegatingAuthorizationManager`.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`final class`
`RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl`
An object that allows configuring the `AuthorizationManager` for `RequestMatcher`s.

## Constructor Summary

Constructors
Constructor
Description
`Builder()`

## Method Summary

Modifier and Type
Method
Description
`RequestMatcherDelegatingAuthorizationManager.Builder`
`add(RequestMatcher matcher, org.springframework.security.authorization.AuthorizationManager<RequestAuthorizationContext> manager)`
Maps a `RequestMatcher` to an `AuthorizationManager`.
`RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl`
`anyRequest()`
Maps any request.
`RequestMatcherDelegatingAuthorizationManager`
`build()`
Creates a `RequestMatcherDelegatingAuthorizationManager` instance.
`RequestMatcherDelegatingAuthorizationManager.Builder`
`mappings(Consumer<List<RequestMatcherEntry<org.springframework.security.authorization.AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer)`
Allows to configure the `RequestMatcher` to `AuthorizationManager` mappings.
`RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl`
`requestMatchers(RequestMatcher... matchers)`
Maps `RequestMatcher`s to `AuthorizationManager`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### Builder

public Builder()

## Method Details

### add

public RequestMatcherDelegatingAuthorizationManager.Builder add(RequestMatcher matcher, org.springframework.security.authorization.AuthorizationManager<RequestAuthorizationContext> manager)
Maps a `RequestMatcher` to an `AuthorizationManager`.

Parameters:
  `matcher` - the `RequestMatcher` to use
  `manager` - the `AuthorizationManager` to use
Returns:
  the `RequestMatcherDelegatingAuthorizationManager.Builder` for further customizations

### mappings

public RequestMatcherDelegatingAuthorizationManager.Builder mappings(Consumer<List<RequestMatcherEntry<org.springframework.security.authorization.AuthorizationManager<RequestAuthorizationContext>>>> mappingsConsumer)
Allows to configure the `RequestMatcher` to `AuthorizationManager` mappings.

Parameters:
  `mappingsConsumer` - used to configure the `RequestMatcher` to `AuthorizationManager` mappings.
Returns:
  the `RequestMatcherDelegatingAuthorizationManager.Builder` for further customizations
Since:
  5.7

### anyRequest

public RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl anyRequest()
Maps any request.

Returns:
  the `RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl` for further customizations
Since:
  6.2

### requestMatchers

public RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl requestMatchers(RequestMatcher... matchers)
Maps `RequestMatcher`s to `AuthorizationManager`.

Parameters:
  `matchers` - the `RequestMatcher`s to map
Returns:
  the `RequestMatcherDelegatingAuthorizationManager.Builder.AuthorizedUrl` for further customizations
Since:
  6.2

### build

public RequestMatcherDelegatingAuthorizationManager build()
Creates a `RequestMatcherDelegatingAuthorizationManager` instance.

Returns:
  the `RequestMatcherDelegatingAuthorizationManager` instance