#103: Fixed build issue

This commit is contained in:
kdeng00
2024-08-07 19:39:30 -04:00
parent b3b5a975d9
commit af45a49c05
2 changed files with 6 additions and 4 deletions
+2 -3
View File
@@ -15,6 +15,8 @@
<PackageReference Include="File.TypeChecker" Version="4.1.1" />
<PackageReference Include="Iconic.Zlib.Netstandard" Version="1.0.0" />
<PackageReference Include="JWT" Version="10.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
@@ -35,9 +37,6 @@
<ProjectReference Include="..\Models\Models.csproj" />
</ItemGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<Content Update="nlog.config" CopyToOutputDirectory="PreserveNewest" />
+3
View File
@@ -1,4 +1,5 @@
// using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.EntityFrameworkCore;
using Microsoft.IdentityModel.Tokens;
using Microsoft.OpenApi.Models;
@@ -55,6 +56,8 @@ var connString = Configuration.GetConnectionString("DefaultConnection");
// Microsoft.AspNetCore.Authentication
// builder.Services.AddAuthentication()
// var sch = Microsoft.AspNetCore.Authentication.JwtBearer;
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(options =>
{
options.RequireHttpsMetadata = false;