This commit is contained in:
2021-10-13 18:16:47 -04:00
parent d0ad783cfd
commit 2552ad4d87
3 changed files with 45 additions and 0 deletions

View File

@@ -29,6 +29,17 @@ namespace Web
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSingleton<WeatherForecastService>();
services.AddAuthentication(options =>
{
options.DefaultScheme = "Cookies";
options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies")
.AddOpenIdConnect(options =>
{
options.Authority = "https://authentik.mattstop.com/application/o/petrie-panel/";
options.ClientId = "85bcc426a47ac2c3575b6d590ec4f53db237e212";
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
@@ -49,6 +60,7 @@ namespace Web
app.UseStaticFiles();
app.UseRouting();
//app.UseAuthentication();
app.UseEndpoints(endpoints =>
{