Update OpenID connect Azure sample
This commit is contained in:
parent
91e5de4d69
commit
7ea76f5e54
|
|
@ -107,7 +107,11 @@ namespace OpenIdConnect.AzureAdSample
|
||||||
{
|
{
|
||||||
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
await WriteHtmlAsync(context.Response,
|
await WriteHtmlAsync(context.Response,
|
||||||
response => response.WriteAsync($"<h1>Signed out locally: {HtmlEncode(context.User.Identity.Name)}</h1><a class=\"btn btn-primary\" href=\"/\">Sign In</a>"));
|
async response =>
|
||||||
|
{
|
||||||
|
await response.WriteAsync($"<h1>Signed out locally: {HtmlEncode(context.User.Identity.Name)}</h1>");
|
||||||
|
await response.WriteAsync("<a class=\"btn btn-primary\" href=\"/\">Sign In</a>");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (context.Request.Path.Equals("/signout-remote"))
|
else if (context.Request.Path.Equals("/signout-remote"))
|
||||||
{
|
{
|
||||||
|
|
@ -121,7 +125,11 @@ namespace OpenIdConnect.AzureAdSample
|
||||||
{
|
{
|
||||||
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
await context.Authentication.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
await WriteHtmlAsync(context.Response,
|
await WriteHtmlAsync(context.Response,
|
||||||
response => response.WriteAsync($"<h1>Signed out remotely: {HtmlEncode(context.User.Identity.Name)}</h1><a class=\"btn btn-primary\" href=\"/\">Sign In</a>"));
|
async response =>
|
||||||
|
{
|
||||||
|
await response.WriteAsync($"<h1>Signed out remotely: {HtmlEncode(context.User.Identity.Name)}</h1>");
|
||||||
|
await response.WriteAsync("<a class=\"btn btn-primary\" href=\"/\">Sign In</a>");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue