Skip to content

Commit ca28879

Browse files
committed
2 parents fa4de6c + b4b3e9d commit ca28879

22 files changed

Lines changed: 892 additions & 308 deletions

File tree

config/src/main/java/org/springframework/security/config/annotation/web/configurers/WebAuthnConfigurer.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
2525
import org.springframework.context.ApplicationContext;
2626
import org.springframework.http.converter.HttpMessageConverter;
27+
import org.springframework.security.authentication.AuthenticationEventPublisher;
2728
import org.springframework.security.authentication.ProviderManager;
2829
import org.springframework.security.config.annotation.web.HttpSecurityBuilder;
2930
import org.springframework.security.core.authority.FactorGrantedAuthority;
@@ -176,8 +177,10 @@ public void configure(H http) {
176177
WebAuthnRelyingPartyOperations rpOperations = webAuthnRelyingPartyOperations(userEntities, userCredentials);
177178
PublicKeyCredentialCreationOptionsRepository creationOptionsRepository = creationOptionsRepository();
178179
WebAuthnAuthenticationFilter webAuthnAuthnFilter = new WebAuthnAuthenticationFilter();
179-
webAuthnAuthnFilter.setAuthenticationManager(
180-
new ProviderManager(new WebAuthnAuthenticationProvider(rpOperations, userDetailsService)));
180+
ProviderManager providerManager = new ProviderManager(
181+
new WebAuthnAuthenticationProvider(rpOperations, userDetailsService));
182+
getBeanOrNull(AuthenticationEventPublisher.class).ifPresent(providerManager::setAuthenticationEventPublisher);
183+
webAuthnAuthnFilter.setAuthenticationManager(providerManager);
181184
webAuthnAuthnFilter = postProcess(webAuthnAuthnFilter);
182185
WebAuthnRegistrationFilter webAuthnRegistrationFilter = new WebAuthnRegistrationFilter(userCredentials,
183186
rpOperations);

config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/server/resource/DPoPAuthenticationConfigurer.java

Lines changed: 0 additions & 239 deletions
This file was deleted.

0 commit comments

Comments
 (0)