WIP separation Web et API
This commit is contained in:
parent
1d6cad7bef
commit
49826eae4a
55 changed files with 68 additions and 95 deletions
|
|
@ -12,13 +12,13 @@ using Microsoft.AspNetCore.Mvc;
|
|||
// But, this redirect URI doesn't need to match the OAuth parameter, it's serialized in the query state,
|
||||
// to be used once the identification ends.
|
||||
var properties = new AuthenticationProperties { RedirectUri = returnUrl };
|
||||
return new ChallengeResult("Yavsc", properties);
|
||||
return new ChallengeResult("oidc", properties);
|
||||
}
|
||||
|
||||
[HttpGet("~/signout")]
|
||||
public async Task<IActionResult> SignOut(string returnUrl="/") {
|
||||
|
||||
return SignOut("Cookies", "Yavsc");
|
||||
return SignOut("Cookies", "oidc");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ namespace testOauthClient.Controllers
|
|||
var client = new HttpClient(new HttpClientHandler(){ AllowAutoRedirect=false });
|
||||
client.DefaultRequestHeaders.Add("Accept", "application/json");
|
||||
client.SetBearerToken(accessToken);
|
||||
var content = await client.GetAsync("https://localhost:5001/api/account/me");
|
||||
var content = await client.GetAsync("https://localhost:6001/api/account/me");
|
||||
content.EnsureSuccessStatusCode();
|
||||
var json = await content.Content.ReadAsStreamAsync();
|
||||
var obj = JsonSerializer.Deserialize<JsonElement>(json);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue