fix iscredentialsinheader reverse condition
All checks were successful
Publish NuGets / build (release) Successful in 17s
All checks were successful
Publish NuGets / build (release) Successful in 17s
This commit is contained in:
parent
61f7c0f05e
commit
560f562205
@ -31,7 +31,7 @@ public class JwtTokenManagerService(JwtTokenManagerOptions options, IHttpClientF
|
|||||||
new ("scopes", string.Join(" ", _scopes))
|
new ("scopes", string.Join(" ", _scopes))
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.IsCredentialsInHeader)
|
if (false == options.IsCredentialsInHeader)
|
||||||
{
|
{
|
||||||
formContentKeyValues.AddRange([
|
formContentKeyValues.AddRange([
|
||||||
new KeyValuePair<string, string>("client_id", options.ClientId),
|
new KeyValuePair<string, string>("client_id", options.ClientId),
|
||||||
@ -45,8 +45,9 @@ public class JwtTokenManagerService(JwtTokenManagerOptions options, IHttpClientF
|
|||||||
Content = formContent
|
Content = formContent
|
||||||
};
|
};
|
||||||
|
|
||||||
if (false == options.IsCredentialsInHeader)
|
if (options.IsCredentialsInHeader)
|
||||||
{
|
{
|
||||||
|
|
||||||
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{options.ClientId}:{options.ClientSecret}"));
|
var credentials = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{options.ClientId}:{options.ClientSecret}"));
|
||||||
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", credentials);
|
request.Headers.Authorization = new AuthenticationHeaderValue("Basic", credentials);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user