Browse Source

Polish logging in OAuth2ClientAuthenticationFilter

Closes gh-2025
pull/2030/head
Joe Grandja 7 months ago
parent
commit
5bf66c305d
  1. 6
      oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java

6
oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/web/OAuth2ClientAuthenticationFilter.java

@ -1,5 +1,5 @@ @@ -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 @@ -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,

Loading…
Cancel
Save