Update signed out redirect url in sample
This commit is contained in:
parent
fa0a68a847
commit
ed6984fab5
|
|
@ -81,7 +81,7 @@ namespace OpenIdConnect.AzureAdSample
|
||||||
ClientSecret = clientSecret, // for code flow
|
ClientSecret = clientSecret, // for code flow
|
||||||
Authority = authority,
|
Authority = authority,
|
||||||
ResponseType = OpenIdConnectResponseType.CodeIdToken,
|
ResponseType = OpenIdConnectResponseType.CodeIdToken,
|
||||||
PostLogoutRedirectUri = "/usersignout",
|
PostLogoutRedirectUri = "/signed-out",
|
||||||
// GetClaimsFromUserInfoEndpoint = true,
|
// GetClaimsFromUserInfoEndpoint = true,
|
||||||
Events = new OpenIdConnectEvents()
|
Events = new OpenIdConnectEvents()
|
||||||
{
|
{
|
||||||
|
|
@ -128,10 +128,16 @@ namespace OpenIdConnect.AzureAdSample
|
||||||
else if (context.Request.Path.Equals("/signout-remote"))
|
else if (context.Request.Path.Equals("/signout-remote"))
|
||||||
{
|
{
|
||||||
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
await context.Authentication.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties
|
await context.Authentication.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme);
|
||||||
{
|
}
|
||||||
RedirectUri = "/remote-signedout"
|
else if (context.Request.Path.Equals("/signed-out"))
|
||||||
});
|
{
|
||||||
|
await WriteHtmlAsync(context.Response,
|
||||||
|
async response =>
|
||||||
|
{
|
||||||
|
await response.WriteAsync($"<h1>You have been signed out.</h1>");
|
||||||
|
await response.WriteAsync("<a class=\"btn btn-primary\" href=\"/signin\">Sign In</a>");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (context.Request.Path.Equals("/remote-signedout"))
|
else if (context.Request.Path.Equals("/remote-signedout"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue