Keycloak.Net
Keycloak.Net copied to clipboard
clientId is HardCoded in FlurlExtensions.cs
var result = await url
.AppendPathSegment($"/auth/realms/{realm}/protocol/openid-connect/token")
.WithHeader("Content-Type", "application/x-www-form-urlencoded")
.PostUrlEncodedAsync(new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("grant_type", "client_credentials"),
new KeyValuePair<string, string>("client_secret", clientSecret),
new KeyValuePair<string, string>("client_id", "admin-cli") // <-------------------- Hardcoded
})
.ReceiveJson().ConfigureAwait(false);
There should be an overload in the constructor of KeycloakClient where client_id could be passed. I could submit a PR.