KEYCLOAK-18284 WARNING in the log when login to public clients

This commit is contained in:
mposolda 2021-05-26 09:36:51 +02:00 committed by Marek Posolda
parent 5c71c3d97f
commit 9b76b07144

View file

@ -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