Package org.springframework.security.web.authentication

# Class RequestMatcherDelegatingAuthenticationManagerResolver

java.lang.Object
org.springframework.security.web.authentication.RequestMatcherDelegatingAuthenticationManagerResolver

All Implemented Interfaces:
  `org.springframework.security.authentication.AuthenticationManagerResolver<jakarta.servlet.http.HttpServletRequest>`

public final class RequestMatcherDelegatingAuthenticationManagerResolver extends Object implements org.springframework.security.authentication.AuthenticationManagerResolver<jakarta.servlet.http.HttpServletRequest>
An `AuthenticationManagerResolver` that returns a `AuthenticationManager` instances based upon the type of `HttpServletRequest` passed into `resolve(HttpServletRequest)`.

Since:
  5.7

## Nested Class Summary

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

## Method Summary

Modifier and Type
Method
Description
`static RequestMatcherDelegatingAuthenticationManagerResolver.Builder`
`builder()`
Creates a builder for `RequestMatcherDelegatingAuthorizationManager`.
`org.springframework.security.authentication.AuthenticationManager`
`resolve(jakarta.servlet.http.HttpServletRequest context)`
`void`
`setDefaultAuthenticationManager(org.springframework.security.authentication.AuthenticationManager defaultAuthenticationManager)`
Set the default `AuthenticationManager` to use when a request does not match

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

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

## Method Details

### resolve

public org.springframework.security.authentication.AuthenticationManager resolve(jakarta.servlet.http.HttpServletRequest context)

Specified by:
  `resolve` in interface `org.springframework.security.authentication.AuthenticationManagerResolver<jakarta.servlet.http.HttpServletRequest>`

### setDefaultAuthenticationManager

public void setDefaultAuthenticationManager(org.springframework.security.authentication.AuthenticationManager defaultAuthenticationManager)
Set the default `AuthenticationManager` to use when a request does not match

Parameters:
  `defaultAuthenticationManager` - the default `AuthenticationManager` to use

### builder

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

Returns:
  the new `RequestMatcherDelegatingAuthorizationManager.Builder` instance