Compare commits

...

1 Commits
8.2.0 ... main

Author SHA1 Message Date
560f562205
fix iscredentialsinheader reverse condition
All checks were successful
Publish NuGets / build (release) Successful in 17s
2025-03-17 10:35:18 -04:00

View File

@ -31,7 +31,7 @@ public class JwtTokenManagerService(JwtTokenManagerOptions options, IHttpClientF
new ("scopes", string.Join(" ", _scopes))
};
if (options.IsCredentialsInHeader)
if (false == options.IsCredentialsInHeader)
{
formContentKeyValues.AddRange([
new KeyValuePair<string, string>("client_id", options.ClientId),
@ -45,8 +45,9 @@ public class JwtTokenManagerService(JwtTokenManagerOptions options, IHttpClientF
Content = formContent
};
if (false == options.IsCredentialsInHeader)
if (options.IsCredentialsInHeader)
{
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{options.ClientId}:{options.ClientSecret}"));
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", credentials);
}