Skip to content

Commit 5da3868

Browse files
committed
introduce DPoPAuthenticationFilter to avoid conflict with other AuthenticationFilter (#17173)
Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
1 parent 6d3b54d commit 5da3868

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ final class DPoPAuthenticationConfigurer<B extends HttpSecurityBuilder<B>>
7777
public void configure(B http) {
7878
AuthenticationManager authenticationManager = http.getSharedObject(AuthenticationManager.class);
7979
http.authenticationProvider(new DPoPAuthenticationProvider(authenticationManager));
80-
AuthenticationFilter authenticationFilter = new AuthenticationFilter(authenticationManager,
80+
AuthenticationFilter authenticationFilter = new DPoPAuthenticationFilter(authenticationManager,
8181
getAuthenticationConverter());
8282
authenticationFilter.setRequestMatcher(getRequestMatcher());
8383
authenticationFilter.setSuccessHandler(getAuthenticationSuccessHandler());
@@ -215,4 +215,13 @@ private static String toWWWAuthenticateHeader(Map<String, String> parameters) {
215215

216216
}
217217

218+
private static final class DPoPAuthenticationFilter extends AuthenticationFilter {
219+
220+
private DPoPAuthenticationFilter(AuthenticationManager authenticationManager,
221+
AuthenticationConverter authenticationConverter) {
222+
super(authenticationManager, authenticationConverter);
223+
}
224+
225+
}
226+
218227
}

0 commit comments

Comments
 (0)