Skip to content

Commit 5633605

Browse files
committed
#23 #25 Tune client side timeout and add keycloak-less support
1 parent 4a09285 commit 5633605

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pkg/connectors/microcks_client.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,15 @@ func (c *microcksClient) GetKeycloakURL() (string, error) {
107107
}
108108

109109
// Retrieve auth server url and realm name.
110+
enabled := configResp["enabled"].(bool)
110111
authServerURL := configResp["auth-server-url"].(string)
111112
realmName := configResp["realm"].(string)
112113

113-
// Return a proper URL.
114-
return authServerURL + "/realms/" + realmName + "/", nil
114+
// Return a proper URL or 'null' if Keycloak is disables.
115+
if enabled {
116+
return authServerURL + "/realms/" + realmName + "/", nil
117+
}
118+
return "null", nil
115119
}
116120

117121
func (c *microcksClient) SetOAuthToken(oauthToken string) {

0 commit comments

Comments
 (0)