Package org.springframework.security.config.annotation.authentication.configurers.userdetails

# Class AbstractDaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>,U extends org.springframework.security.core.userdetails.UserDetailsService>

java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.authentication.AuthenticationManager,B>
org.springframework.security.config.annotation.authentication.configurers.userdetails.UserDetailsAwareConfigurer<B,U>
org.springframework.security.config.annotation.authentication.configurers.userdetails.AbstractDaoAuthenticationConfigurer<B,C,U>

Type Parameters:
  `B` - the type of the `SecurityBuilder`
  `C` - the type of `AbstractDaoAuthenticationConfigurer` this is
  `U` - The type of `UserDetailsService` that is being used

All Implemented Interfaces:
  `SecurityConfigurer<org.springframework.security.authentication.AuthenticationManager,B>`

Direct Known Subclasses:
  `DaoAuthenticationConfigurer`, `UserDetailsServiceConfigurer`

public abstract class AbstractDaoAuthenticationConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>,U extends org.springframework.security.core.userdetails.UserDetailsService> extends UserDetailsAwareConfigurer<B,U>
Allows configuring a `DaoAuthenticationProvider`

Since:
  3.2

## Method Summary

Modifier and Type
Method
Description
`void`
`configure(B builder)`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.
`U`
`getUserDetailsService()`
Gets the `UserDetailsService` that is used with the `DaoAuthenticationProvider`
`C`
`passwordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)`
Allows specifying the `PasswordEncoder` to use with the `DaoAuthenticationProvider`.
`C`
`userDetailsPasswordManager(org.springframework.security.core.userdetails.UserDetailsPasswordService passwordManager)`
`C`
`withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)`
Deprecated, for removal: This API element is subject to removal in a future version.
`C`
`withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)`
Adds an `ObjectPostProcessor` for this class.

### Methods inherited from class org.springframework.security.config.annotation.SecurityConfigurerAdapter

`addObjectPostProcessor, addObjectPostProcessor, and, getBuilder, init, postProcess, setBuilder`

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

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

## Method Details

### withObjectPostProcessor

public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Adds an `ObjectPostProcessor` for this class.

Parameters:
  `objectPostProcessor` -
Returns:
  the `AbstractDaoAuthenticationConfigurer` for further customizations

### withObjectPostProcessor

@Deprecated(since="6.4", forRemoval=true) public C withObjectPostProcessor(ObjectPostProcessor<?> objectPostProcessor)
Deprecated, for removal: This API element is subject to removal in a future version.

### passwordEncoder

public C passwordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
Allows specifying the `PasswordEncoder` to use with the `DaoAuthenticationProvider`. The default is to use plain text.

Parameters:
  `passwordEncoder` - The `PasswordEncoder` to use.
Returns:
  the `AbstractDaoAuthenticationConfigurer` for further customizations

### userDetailsPasswordManager

public C userDetailsPasswordManager(org.springframework.security.core.userdetails.UserDetailsPasswordService passwordManager)

### configure

public void configure(B builder) throws Exception
Description copied from interface: `SecurityConfigurer`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.

Specified by:
  `configure` in interface `SecurityConfigurer<B extends ProviderManagerBuilder<B>,C extends AbstractDaoAuthenticationConfigurer<B,C,U>>`
Overrides:
  `configure` in class `SecurityConfigurerAdapter<org.springframework.security.authentication.AuthenticationManager,B extends ProviderManagerBuilder<B>>`
Throws:
  `Exception`

### getUserDetailsService

public U getUserDetailsService()
Gets the `UserDetailsService` that is used with the `DaoAuthenticationProvider`

Specified by:
  `getUserDetailsService` in class `UserDetailsAwareConfigurer<B extends ProviderManagerBuilder<B>,U extends org.springframework.security.core.userdetails.UserDetailsService>`
Returns:
  the `UserDetailsService` that is used with the `DaoAuthenticationProvider`