From 78b88765ecaf5f60524c7879c5673eae91385c5e Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 25 May 2022 16:41:00 -0300 Subject: [PATCH] use toString() instead of cast String or it will fail when using Spring configtree (#10980) Resolves #10979 Co-authored-by: Bruno Oliveira da Silva --- .../authentication/ClientIdAndSecretCredentialsProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authentication/ClientIdAndSecretCredentialsProvider.java b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authentication/ClientIdAndSecretCredentialsProvider.java index 186597c2af..fb78d0c0cb 100644 --- a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authentication/ClientIdAndSecretCredentialsProvider.java +++ b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authentication/ClientIdAndSecretCredentialsProvider.java @@ -45,7 +45,7 @@ public class ClientIdAndSecretCredentialsProvider implements ClientCredentialsPr @Override public void init(KeycloakDeployment deployment, Object config) { - clientSecret = (String) config; + clientSecret = (config == null ? null : config.toString()); } @Override