เรียกรายชื่อจากระบบทดลองงาน

This commit is contained in:
Suphonchai Phoonsawat 2023-09-02 18:19:30 +07:00
parent bb9a0bc73e
commit 3b24682301
5 changed files with 283 additions and 10 deletions

View file

@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.AspNetCore.Mvc.Versioning;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Microsoft.IdentityModel.Logging;
using Microsoft.IdentityModel.Tokens;
using Serilog;
@ -47,6 +48,7 @@ var builder = WebApplication.CreateBuilder(args);
// Authorization
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer(opt =>
{
opt.SaveToken = true;
opt.RequireHttpsMetadata = false; //false for dev
opt.Authority = issuer;
opt.TokenValidationParameters = new()