Package org.springframework.security.config.authentication

# Class AuthenticationManagerFactoryBean

java.lang.Object
org.springframework.security.config.authentication.AuthenticationManagerFactoryBean

All Implemented Interfaces:
  `org.springframework.beans.factory.Aware`, `org.springframework.beans.factory.BeanFactoryAware`, `org.springframework.beans.factory.FactoryBean<org.springframework.security.authentication.AuthenticationManager>`

public class AuthenticationManagerFactoryBean extends Object implements org.springframework.beans.factory.FactoryBean<org.springframework.security.authentication.AuthenticationManager>, org.springframework.beans.factory.BeanFactoryAware
Factory bean for the namespace AuthenticationManager, which allows a more meaningful error message to be reported in the `NoSuchBeanDefinitionException`, if the user has forgotten to declare the <authentication-manager> element.

Since:
  3.0

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`MISSING_BEAN_ERROR_MESSAGE`

### Fields inherited from interface org.springframework.beans.factory.FactoryBean

`OBJECT_TYPE_ATTRIBUTE`

## Constructor Summary

Constructors
Constructor
Description
`AuthenticationManagerFactoryBean()`

## Method Summary

Modifier and Type
Method
Description
`org.springframework.security.authentication.AuthenticationManager`
`getObject()`
`Class<? extends org.springframework.security.authentication.AuthenticationManager>`
`getObjectType()`
`boolean`
`isSingleton()`
`void`
`setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)`
`void`
`setObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry)`

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

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

## Field Details

### MISSING_BEAN_ERROR_MESSAGE

public static final String MISSING_BEAN_ERROR_MESSAGE

See Also:
  - Constant Field Values

## Constructor Details

### AuthenticationManagerFactoryBean

public AuthenticationManagerFactoryBean()

## Method Details

### getObject

public org.springframework.security.authentication.AuthenticationManager getObject() throws Exception

Specified by:
  `getObject` in interface `org.springframework.beans.factory.FactoryBean<org.springframework.security.authentication.AuthenticationManager>`
Throws:
  `Exception`

### getObjectType

public Class<? extends org.springframework.security.authentication.AuthenticationManager> getObjectType()

Specified by:
  `getObjectType` in interface `org.springframework.beans.factory.FactoryBean<org.springframework.security.authentication.AuthenticationManager>`

### isSingleton

public boolean isSingleton()

Specified by:
  `isSingleton` in interface `org.springframework.beans.factory.FactoryBean<org.springframework.security.authentication.AuthenticationManager>`

### setBeanFactory

public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) throws org.springframework.beans.BeansException

Specified by:
  `setBeanFactory` in interface `org.springframework.beans.factory.BeanFactoryAware`
Throws:
  `org.springframework.beans.BeansException`

### setObservationRegistry

public void setObservationRegistry(io.micrometer.observation.ObservationRegistry observationRegistry)