Skip to content

Commit 2774948

Browse files
committed
Fix X509 WebFlux Configuration Checks
The changes for gh-17382 broke the checkstyle and tests. This fixes them both. Issue gh-17382
1 parent b502697 commit 2774948

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3256,7 +3256,7 @@ protected void configure(ServerHttpSecurity http) {
32563256
X509PrincipalExtractor principalExtractor = getPrincipalExtractor();
32573257
ServerAuthenticationConverter converter = getServerAuthenticationConverter(principalExtractor);
32583258
AuthenticationWebFilter filter = new AuthenticationWebFilter(authenticationManager);
3259-
filter.setServerAuthenticationConverter(serverAuthenticationConverter);
3259+
filter.setServerAuthenticationConverter(converter);
32603260
http.addFilterAt(filter, SecurityWebFiltersOrder.AUTHENTICATION);
32613261
}
32623262

config/src/test/java/org/springframework/security/config/web/server/ServerHttpSecurityTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ public void x509WithConverterAndNoExtractorThenAddsX509Filter() {
504504
this.http.x509((x509) -> x509.serverAuthenticationConverter(mockConverter));
505505
SecurityWebFilterChain securityWebFilterChain = this.http.build();
506506
WebFilter x509WebFilter = securityWebFilterChain.getWebFilters()
507-
.filter(filter -> matchesX509Converter(filter, mockConverter))
507+
.filter((filter) -> matchesX509Converter(filter, mockConverter))
508508
.blockFirst();
509509
assertThat(x509WebFilter).isNotNull();
510510
}

0 commit comments

Comments
 (0)