Package org.springframework.security.config.annotation.web.configurers

# Class DefaultLoginPageConfigurer<H extends HttpSecurityBuilder<H>>

java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,B>
org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer<DefaultLoginPageConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.DefaultLoginPageConfigurer<H>

All Implemented Interfaces:
  `SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H>`

public final class DefaultLoginPageConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<DefaultLoginPageConfigurer<H>,H>
Adds a Filter that will generate a login page if one is not specified otherwise when using `EnableWebSecurity`.

By default an `InsecureChannelProcessor` and a `SecureChannelProcessor` will be registered.

## Security Filters

The following Filters are conditionally populated

- `DefaultLoginPageGeneratingFilter` if the `FormLoginConfigurer` did not have a login page specified

## Shared Objects Created

No shared objects are created.

## Shared Objects Used

The following shared objects are used:

- `PortMapper` is used to create the default `ChannelProcessor` instances
- `FormLoginConfigurer` is used to determine if the `DefaultLoginPageConfigurer` should be added and how to configure it.

Since:
  3.2
See Also:
  - `EnableWebSecurity`

## Constructor Summary

Constructors
Constructor
Description
`DefaultLoginPageConfigurer()`

## Method Summary

Modifier and Type
Method
Description
`void`
`configure(H http)`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.
`void`
`init(H http)`
Initialize the `SecurityBuilder`.

### Methods inherited from class org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer

`disable, getSecurityContextHolderStrategy, withObjectPostProcessor, withObjectPostProcessor`

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

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

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

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

## Constructor Details

### DefaultLoginPageConfigurer

public DefaultLoginPageConfigurer()

## Method Details

### init

public void init(H http)
Description copied from interface: `SecurityConfigurer`
Initialize the `SecurityBuilder`. Here only shared state should be created and modified, but not properties on the `SecurityBuilder` used for building the object. This ensures that the `SecurityConfigurer.configure(SecurityBuilder)` method uses the correct shared objects when building. Configurers should be applied here.

Specified by:
  `init` in interface `SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`
Overrides:
  `init` in class `SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`

### configure

public void configure(H http)
Description copied from interface: `SecurityConfigurer`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.

Specified by:
  `configure` in interface `SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`
Overrides:
  `configure` in class `SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,H extends HttpSecurityBuilder<H>>`