diff --git a/docker/keycloak/extensions-22.0.8/services/src/main/java/com/github/bcgov/keycloak/broker/oidc/OverrideOIDCIdentityProviderFactory.java b/docker/keycloak/extensions-22.0.8/services/src/main/java/com/github/bcgov/keycloak/broker/oidc/OverrideOIDCIdentityProviderFactory.java index 04f34052..9e6fd752 100644 --- a/docker/keycloak/extensions-22.0.8/services/src/main/java/com/github/bcgov/keycloak/broker/oidc/OverrideOIDCIdentityProviderFactory.java +++ b/docker/keycloak/extensions-22.0.8/services/src/main/java/com/github/bcgov/keycloak/broker/oidc/OverrideOIDCIdentityProviderFactory.java @@ -1,14 +1,12 @@ package com.github.bcgov.keycloak.broker.oidc; -import java.util.List; +import java.util.HashMap; import org.keycloak.broker.oidc.OIDCIdentityProvider; import org.keycloak.broker.oidc.OIDCIdentityProviderConfig; import org.keycloak.broker.oidc.OIDCIdentityProviderFactory; import org.keycloak.models.IdentityProviderModel; import org.keycloak.models.KeycloakSession; -import org.keycloak.provider.ProviderConfigProperty; -import org.keycloak.provider.ProviderConfigurationBuilder; /** @author Junmin Ahn */ public class OverrideOIDCIdentityProviderFactory extends OIDCIdentityProviderFactory { @@ -22,6 +20,10 @@ public String getName() { @Override public OIDCIdentityProvider create(KeycloakSession session, IdentityProviderModel model) { + boolean legacyLogoutRedirectUriSupported = Boolean + .parseBoolean(model.getConfig().get("legacyLogoutRedirectUriSupported")); + model.setConfig(new HashMap<>(model.getConfig())); + model.getConfig().put("legacyLogoutRedirectUriSupported", String.valueOf(legacyLogoutRedirectUriSupported)); return new OverrideOIDCIdentityProvider(session, new OIDCIdentityProviderConfig(model)); } @@ -29,11 +31,4 @@ public OIDCIdentityProvider create(KeycloakSession session, IdentityProviderMode public String getId() { return PROVIDER_ID; } - - public List getConfigProperties() { - return ProviderConfigurationBuilder.create().property() - .name("legacyLogoutRedirectUriSupported").label("Legacy Logout Redirect URI") - .helpText("Does the external IDP support legacy logout redirect URI (redirect_uri)?") - .type(ProviderConfigProperty.BOOLEAN_TYPE).add().build(); - } }