Skip to content

Commit

Permalink
fixing broker urls
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Igor <[email protected]>
  • Loading branch information
pedroigor committed Jul 1, 2024
1 parent 3bfcb83 commit ea2ec4d
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ protected void addIdentityProviders(KeycloakSession session, String orgId, Count
client.setSecret("secret");
client.setProtocol(OIDCLoginProtocol.LOGIN_PROTOCOL);
client.setPublicClient(false);
client.addRedirectUri("http://localhost:8180/realms/" + realm.getName() + "/broker/*");
}

long count = latch.getCount();
Expand All @@ -115,20 +116,19 @@ protected void addIdentityProviders(KeycloakSession session, String orgId, Count
identityProvider.setEnabled(true);
HashMap<String, String> idpConfig = new HashMap<>();
identityProvider.setConfig(idpConfig);
idpConfig.put("issuer", "http://localhost:8180/realms/" + config.getRealmName());
idpConfig.put("jwksUrl", "http://localhost:8180/realms/realm-0/protocol/openid-connect/certs");
idpConfig.put("logoutUrl", "http://localhost:8180/realms/realm-0/protocol/openid-connect/auth");
idpConfig.put("metadataDescriptorUrl", "http://localhost:8180/realms/realm-0/.well-known/openid-configuration");
idpConfig.put("tokenUrl", "http://localhost:8180/realms/realm-0/protocol/openid-connect/token");
idpConfig.put("authorizationUrl", "http://localhost:8180/realms/realm-0/protocol/openid-connect/auth");
idpConfig.put("issuer", "http://localhost:8180/realms/" + realm.getName());
idpConfig.put("jwksUrl", "http://localhost:8180/realms/" + realm.getName() + "/protocol/openid-connect/certs");
idpConfig.put("logoutUrl", "http://localhost:8180/realms/" + realm.getName() + "/protocol/openid-connect/auth");
idpConfig.put("metadataDescriptorUrl", "http://localhost:8180/realms/" + realm.getName() + "/.well-known/openid-configuration");
idpConfig.put("tokenUrl", "http://localhost:8180/realms/" + realm.getName() + "/protocol/openid-connect/token");
idpConfig.put("authorizationUrl", "http://localhost:8180/realms/" + realm.getName() + "/protocol/openid-connect/auth");
idpConfig.put("useJwksUrl", "true");
idpConfig.put("userInfoUrl", "http://localhost:8180/realms/realm-0/protocol/openid-connect/userinfo");
idpConfig.put("userInfoUrl", "http://localhost:8180/realms/" + realm.getName() + "/protocol/openid-connect/userinfo");
idpConfig.put("validateSignature", "true");
idpConfig.put("clientId", "org-broker-client");
idpConfig.put("clientSecret", "secret");
idpConfig.put("clientAuthMethod", "client_secret_post");
realm.addIdentityProvider(identityProvider);
client.addRedirectUri("http://localhost:8180/realms/" + config.getRealmName() + "/broker/" + identityProvider.getAlias() + "/endpoint");
}

if (provider.addIdentityProvider(organization, identityProvider)) {
Expand Down

0 comments on commit ea2ec4d

Please sign in to comment.