Files
PetriePanel/Web/Pages/Login.cshtml.cs
2021-10-13 20:39:11 -04:00

20 lines
582 B
C#

using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Web.Pages
{
public class Login : PageModel
{
// Can't be put into a razor page
public async Task OnGet(string redirectUri)
{
await HttpContext.ChallengeAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties()
{
RedirectUri = redirectUri
});
}
}
}