mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-23 11:17:02 +00:00
20 lines
623 B
C#
20 lines
623 B
C#
using Microsoft.AspNetCore.Authentication;
|
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
|
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace OidcSamples.TaxApp.Controllers
|
|
{
|
|
[Route("[controller]")]
|
|
public class AuthenticationController : Controller
|
|
{
|
|
[HttpGet("Logout")]
|
|
public async Task Logout()
|
|
{
|
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
|
await HttpContext.SignOutAsync(OpenIdConnectDefaults.AuthenticationScheme);
|
|
}
|
|
}
|
|
}
|