From 6bd1d5c8b8a26eaab92aad35c68b4415a8353f05 Mon Sep 17 00:00:00 2001 From: Arthur de Moulins Date: Wed, 8 Jan 2025 11:51:39 +0100 Subject: [PATCH] keycloak: add explicit FORCE mode to JQ filter mapper --- .../src/main/java/com/phrasea/keycloak/JqGroupMapper.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/infra/docker/keycloak/jq-idp-mapper/src/main/java/com/phrasea/keycloak/JqGroupMapper.java b/infra/docker/keycloak/jq-idp-mapper/src/main/java/com/phrasea/keycloak/JqGroupMapper.java index 17f8d19d1..670a99403 100644 --- a/infra/docker/keycloak/jq-idp-mapper/src/main/java/com/phrasea/keycloak/JqGroupMapper.java +++ b/infra/docker/keycloak/jq-idp-mapper/src/main/java/com/phrasea/keycloak/JqGroupMapper.java @@ -23,6 +23,8 @@ public class JqGroupMapper extends AbstractIdentityProviderMapper { protected static final List configProperties = new ArrayList<>(); public static final String JQ_FILTER = "jq_filter"; + private static final Set IDENTITY_PROVIDER_SYNC_MODES = new HashSet<>(Arrays.asList(IdentityProviderSyncMode.values())); + static { ProviderConfigProperty property; property = new ProviderConfigProperty(); @@ -133,4 +135,9 @@ private GroupModel getGroup(RealmModel realm, String groupPath) { public String getHelpText() { return "Add User to a list of Groups coming from the result of the jq filter of the userinfo response."; } + + @Override + public boolean supportsSyncMode(IdentityProviderSyncMode syncMode) { + return IDENTITY_PROVIDER_SYNC_MODES.contains(syncMode); + } }