generated from karsten.jeppesen/KAJE-Template
33 lines
886 B
C#
33 lines
886 B
C#
//
|
|
// Extra packages installed:
|
|
// bootstrap - latest stable 5.x.x
|
|
// Microsoft.AspNetCore.Authentication.JwtBearer - latest version 8.x.x
|
|
// Microsoft.AspNetCore.Authentication.OpenIdConnect - latest version 8.x.x
|
|
// Microsoft.IdentityModel.JsonWebTokens - latest version 8.x.x
|
|
// Microsoft.IdentityModel.Protocols.OpenIdConnect - latest version
|
|
// Newtonsoft.Json - latest
|
|
|
|
|
|
|
|
using Quizzer.OpenIDConnect;
|
|
|
|
var builder = WebApplication.CreateBuilder(args);
|
|
|
|
// Configure for OpenID
|
|
OpenIDConnectUtils myConfig = new();
|
|
|
|
myConfig.ConfigureBuild(builder);
|
|
|
|
var app = builder.Build();
|
|
|
|
// Configure the HTTP request pipeline.
|
|
if (!app.Environment.IsDevelopment())
|
|
{
|
|
app.UseExceptionHandler("/Error");
|
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
|
app.UseHsts();
|
|
}
|
|
|
|
myConfig.ConfigureApp(app);
|
|
|