Skip to content

Commit

Permalink
Provisioning organization brokers to now shown on login pages by default
Browse files Browse the repository at this point in the history
Closes #997

Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
  • Loading branch information
pedroigor committed Oct 3, 2024
1 parent 785c879 commit 24ece7a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ protected void addIdentityProviders(KeycloakSession session, String orgId, Count
identityProvider.setProviderId(KeycloakOIDCIdentityProviderFactory.PROVIDER_ID);
identityProvider.setLoginHint(true);
identityProvider.setEnabled(true);
identityProvider.setHideOnLogin(true);
HashMap<String, String> idpConfig = new HashMap<>();
identityProvider.setConfig(idpConfig);
idpConfig.put("issuer", "http://localhost:8180/realms/" + realm.getName());
Expand All @@ -132,7 +133,7 @@ protected void addIdentityProviders(KeycloakSession session, String orgId, Count
mapper.setName(idpAlias + "-idp-mapper-" + j);
mapper.setIdentityProviderMapper(HardcodedRoleMapper.PROVIDER_ID);
mapper.setConfig(Map.of(
ConfigConstants.ROLE, OAuth2Constants.OFFLINE_ACCESS,
ConfigConstants.ROLE, OAuth2Constants.OFFLINE_ACCESS,
IdentityProviderMapperModel.SYNC_MODE, IdentityProviderMapperSyncMode.INHERIT.toString()
));
realm.addIdentityProviderMapper(mapper);
Expand Down

0 comments on commit 24ece7a

Please sign in to comment.