Class WebAuthnConfigurer<H extends HttpSecurityBuilder<H>>
java.lang.Object
org.springframework.security.config.annotation.SecurityConfigurerAdapter<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<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
-
Method Summary
Modifier and TypeMethodDescriptionallowedOrigins
(String... allowedOrigins) Convenience method forallowedOrigins(Set)
allowedOrigins
(Set<String> allowedOrigins) Sets the allowed origins.void
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.disableDefaultRegistrationPage
(boolean disable) Configures whether the default webauthn registration should be disabled.The Relying Party id.Sets the relying party nameMethods 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
-
Constructor Details
-
WebAuthnConfigurer
public WebAuthnConfigurer()
-
-
Method Details
-
rpId
The Relying Party id.- Parameters:
rpId
- the relying party id- Returns:
- the
WebAuthnConfigurer
for further customization
-
rpName
Sets the relying party name- Parameters:
rpName
- the relying party name- Returns:
- the
WebAuthnConfigurer
for further customization
-
allowedOrigins
Convenience method forallowedOrigins(Set)
- Parameters:
allowedOrigins
- the allowed origins- Returns:
- the
WebAuthnConfigurer
for further customization - See Also:
-
allowedOrigins
Sets the allowed origins.- Parameters:
allowedOrigins
- the allowed origins- Returns:
- the
WebAuthnConfigurer
for further customization - See Also:
-
disableDefaultRegistrationPage
Configures whether the default webauthn registration should be disabled. Setting it totrue
will prevent the configurer from registering theDefaultWebAuthnRegistrationPageGeneratingFilter
.- Parameters:
disable
- disable the default registration page if true, enable it otherwise- Returns:
- the
WebAuthnConfigurer
for further customization
-
configure
Description copied from interface:SecurityConfigurer
Configure theSecurityBuilder
by setting the necessary properties on theSecurityBuilder
.- Specified by:
configure
in interfaceSecurityConfigurer<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Overrides:
configure
in classSecurityConfigurerAdapter<DefaultSecurityFilterChain,
H extends HttpSecurityBuilder<H>> - Throws:
Exception
-