ya cleanup

This commit is contained in:
Paul Schneider 2025-02-16 17:28:38 +00:00
commit 3ab92ea9a5
17 changed files with 107 additions and 301 deletions

View file

@ -71,7 +71,7 @@ namespace testOauthClient.Controllers
var accessToken = await HttpContext.GetTokenAsync("access_token");
var client = new HttpClient(new HttpClientHandler(){ AllowAutoRedirect=false });
client.DefaultRequestHeaders.Add("Accept", "application/json");
client.SetBearerToken(accessToken);
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
var content = await client.GetAsync("https://localhost:6001/identity");
content.EnsureSuccessStatusCode();
var json = await content.Content.ReadAsStreamAsync();