Skip to content

Commit

Permalink
fix sdfsdfsd (#891)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaybeeelsdon authored Dec 12, 2024
1 parent 15187ac commit 03f91d3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DARE-API/Services/KeycloakMinioUserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,11 @@ public async Task<string> GetUserIDAsync(string accessToken, string userName)
var baseUrl = _submissionKeyCloakSettings.Server;
var realm = _submissionKeyCloakSettings.Realm;
HttpClient httpClient = new HttpClient(_submissionKeyCloakSettings.getProxyHandler);

httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);

var apiUrl = $"https://{baseUrl}/admin/realms/{realm}/users?username={userName}";

Log.Information("{Function} BaseUrl {BaseUrl} and API Url {ApiUrl}", "GetUserIDAsync", baseUrl, apiUrl);
var response = await httpClient.GetAsync(apiUrl);

var jsonString = await response.Content.ReadAsStringAsync();
Expand Down

0 comments on commit 03f91d3

Please sign in to comment.