|
|
|
@ -74,9 +74,8 @@ namespace testOauthClient.Controllers
|
|
|
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
|
|
|
|
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
|
|
|
|
var content = await client.GetAsync("https://localhost:6001/identity");
|
|
|
|
var content = await client.GetAsync("https://localhost:6001/identity");
|
|
|
|
content.EnsureSuccessStatusCode();
|
|
|
|
content.EnsureSuccessStatusCode();
|
|
|
|
var json = await content.Content.ReadAsStreamAsync();
|
|
|
|
var json = await content.Content.ReadAsStringAsync();
|
|
|
|
var obj = JsonSerializer.Deserialize<JsonElement>(json);
|
|
|
|
return View("UserInfo", json);
|
|
|
|
return View("UserInfo", obj.ToString());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|