Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ntruchsess committed Oct 7, 2024
1 parent 0db5212 commit cf5db4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/********************************************************************************
* Copyright (c) 2022 BMW Group AG
* Copyright (c) 2022 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ private static async Task<string> GetAccessTokenAsync(string url, string realm,
.WithHeader("Accept", "application/json")
.PostUrlEncodedAsync(new List<KeyValuePair<string, string>>
{
new KeyValuePair<string, string>("grant_type", "password"),
new KeyValuePair<string, string>("username", userName),
new KeyValuePair<string, string>("password", password),
new KeyValuePair<string, string>("client_id", "admin-cli")
new("grant_type", "password"),
new("username", userName),
new("password", password),
new("client_id", "admin-cli")
},
cancellationToken: cancellationToken)
.ReceiveJson<AccessTokenResponse>().ConfigureAwait(ConfigureAwaitOptions.None);
Expand Down Expand Up @@ -112,6 +112,6 @@ public static IFlurlRequest WithForwardedHttpHeaders(this IFlurlRequest request,
}

public record AccessTokenResponse(
[propert: JsonPropertyName("access_token")] string AccessToken
[property: JsonPropertyName("access_token")] string AccessToken
);
}

0 comments on commit cf5db4c

Please sign in to comment.