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

# Class WebAuthnConfigurer<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<WebAuthnConfigurer<H>,H>
org.springframework.security.config.annotation.web.configurers.WebAuthnConfigurer<H>

Type Parameters:
  `H` - the type of builder

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

public class WebAuthnConfigurer<H extends HttpSecurityBuilder<H>> extends AbstractHttpConfigurer<WebAuthnConfigurer<H>,H>
Configures WebAuthn for Spring Security applications

Since:
  6.4

## Constructor Summary

Constructors
Constructor
Description
`WebAuthnConfigurer()`

## Method Summary

Modifier and Type
Method
Description
`WebAuthnConfigurer<H>`
`allowedOrigins(String... allowedOrigins)`
Convenience method for `allowedOrigins(Set)`
`WebAuthnConfigurer<H>`
`allowedOrigins(Set<String> allowedOrigins)`
Sets the allowed origins.
`void`
`configure(H http)`
Configure the `SecurityBuilder` by setting the necessary properties on the `SecurityBuilder`.
`WebAuthnConfigurer<H>`
`disableDefaultRegistrationPage(boolean disable)`
Configures whether the default webauthn registration should be disabled.
`WebAuthnConfigurer<H>`
`rpId(String rpId)`
The Relying Party id.
`WebAuthnConfigurer<H>`
`rpName(String rpName)`
Sets the relying party name

### 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, init, postProcess, setBuilder`

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

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

## Constructor Details

### WebAuthnConfigurer

public WebAuthnConfigurer()

## Method Details

### rpId

public WebAuthnConfigurer<H> rpId(String rpId)
The Relying Party id.

Parameters:
  `rpId` - the relying party id
Returns:
  the `WebAuthnConfigurer` for further customization

### rpName

public WebAuthnConfigurer<H> rpName(String rpName)
Sets the relying party name

Parameters:
  `rpName` - the relying party name
Returns:
  the `WebAuthnConfigurer` for further customization

### allowedOrigins

public WebAuthnConfigurer<H> allowedOrigins(String... allowedOrigins)
Convenience method for `allowedOrigins(Set)`

Parameters:
  `allowedOrigins` - the allowed origins
Returns:
  the `WebAuthnConfigurer` for further customization
See Also:
  - `allowedOrigins(Set)`

### allowedOrigins

public WebAuthnConfigurer<H> allowedOrigins(Set<String> allowedOrigins)
Sets the allowed origins.

Parameters:
  `allowedOrigins` - the allowed origins
Returns:
  the `WebAuthnConfigurer` for further customization
See Also:
  - `allowedOrigins(String...)`

### disableDefaultRegistrationPage

public WebAuthnConfigurer<H> disableDefaultRegistrationPage(boolean disable)
Configures whether the default webauthn registration should be disabled. Setting it to `true` will prevent the configurer from registering the `DefaultWebAuthnRegistrationPageGeneratingFilter`.

Parameters:
  `disable` - disable the default registration page if true, enable it otherwise
Returns:
  the `WebAuthnConfigurer` for further customization

### configure

public void configure(H http) throws Exception
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>>`
Throws:
  `Exception`