From 9b76b07144ac8a90aebbb59220ec644116cee671 Mon Sep 17 00:00:00 2001 From: mposolda Date: Wed, 26 May 2021 09:36:51 +0200 Subject: [PATCH] KEYCLOAK-18284 WARNING in the log when login to public clients --- .../org/keycloak/authentication/ClientAuthenticationFlow.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/src/main/java/org/keycloak/authentication/ClientAuthenticationFlow.java b/services/src/main/java/org/keycloak/authentication/ClientAuthenticationFlow.java index 3f58179408..de214a81ed 100755 --- a/services/src/main/java/org/keycloak/authentication/ClientAuthenticationFlow.java +++ b/services/src/main/java/org/keycloak/authentication/ClientAuthenticationFlow.java @@ -78,8 +78,10 @@ public class ClientAuthenticationFlow implements AuthenticationFlow { // Fallback to secret just in case (for backwards compatibility). Also for public clients, ignore the "clientAuthenticatorType", which is set to them and stick to the // default, which set the client just based on "client_id" parameter if (expectedClientAuthType == null || client.isPublicClient()) { + if (expectedClientAuthType == null) { + ServicesLogger.LOGGER.authMethodFallback(client.getClientId(), expectedClientAuthType); + } expectedClientAuthType = KeycloakModelUtils.getDefaultClientAuthenticatorType(); - ServicesLogger.LOGGER.authMethodFallback(client.getClientId(), expectedClientAuthType); } // Check if client authentication matches