reintroduce microsoft login. upgrade a bunch of stuff.

This commit is contained in:
2023-01-19 16:20:41 -06:00
parent 2a423bcb93
commit 1d0beaf69f
29 changed files with 601 additions and 483 deletions

View File

@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Http.Json;
using Microsoft.AspNetCore.HttpLogging;
using Microsoft.Identity.Web;
using Microsoft.OpenApi.Models;
using Shogi.Api.Managers;
using Shogi.Api.Repositories;
@@ -119,9 +120,9 @@ namespace Shogi.Api
static void AddJwtAuth(WebApplicationBuilder builder)
{
//builder.Services
// .AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
//.AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
builder.Services
.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddMicrosoftIdentityWebApi(builder.Configuration.GetSection("AzureAd"));
}
static void AddCookieAuth(WebApplicationBuilder builder)