From 5bf66c305d823f6cd63c78eb4eaab6f058fb2741 Mon Sep 17 00:00:00 2001 From: Joe Grandja <10884212+jgrandja@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:29:23 -0400 Subject: [PATCH] Polish logging in OAuth2ClientAuthenticationFilter Closes gh-2025 --- .../authorization/web/OAuth2ClientAuthenticationFilter.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java b/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java index bb50ea8e..d620625b 100644 --- a/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java +++ b/oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2020-2024 the original author or authors. + * Copyright 2020-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -192,10 +192,6 @@ public final class OAuth2ClientAuthenticationFilter extends OncePerRequestFilter SecurityContext securityContext = SecurityContextHolder.createEmptyContext(); securityContext.setAuthentication(authentication); SecurityContextHolder.setContext(securityContext); - if (this.logger.isDebugEnabled()) { - this.logger.debug(LogMessage.format("Set SecurityContextHolder authentication to %s", - authentication.getClass().getSimpleName())); - } } private void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response,