From 091976fffb3a487c74acae4c51a4c6ae04b32a0f Mon Sep 17 00:00:00 2001 From: Thomas Hagelberg Date: Fri, 15 Mar 2024 23:47:35 +0200 Subject: [PATCH] Improve logging in AuthenticationWebFilter Closes #14091 --- .../web/server/authentication/AuthenticationWebFilter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/main/java/org/springframework/security/web/server/authentication/AuthenticationWebFilter.java b/web/src/main/java/org/springframework/security/web/server/authentication/AuthenticationWebFilter.java index e9024cf2f8e..c64a7b1080c 100644 --- a/web/src/main/java/org/springframework/security/web/server/authentication/AuthenticationWebFilter.java +++ b/web/src/main/java/org/springframework/security/web/server/authentication/AuthenticationWebFilter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2024 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. @@ -125,7 +125,7 @@ private Mono authenticate(ServerWebExchange exchange, WebFilterChain chain .flatMap( (authentication) -> onAuthenticationSuccess(authentication, new WebFilterExchange(exchange, chain))) .doOnError(AuthenticationException.class, - (ex) -> logger.debug(LogMessage.format("Authentication failed: %s", ex.getMessage()))); + (ex) -> logger.debug(LogMessage.format("Authentication failed: %s", ex.getMessage()), ex)); } protected Mono onAuthenticationSuccess(Authentication authentication, WebFilterExchange webFilterExchange) {