[ADD] Base Authority initial commit

This commit is contained in:
max
2024-12-21 15:30:17 +01:00
parent 21675300bb
commit 2361e12847
18 changed files with 155 additions and 30 deletions

View File

@@ -2,6 +2,7 @@ using DotBased.Logging;
using DotBased.Logging.MEL;
using DotBased.Logging.Serilog;
using Serilog;
using TestWebApi;
using ILogger = Serilog.ILogger;
var builder = WebApplication.CreateBuilder(args);
@@ -18,6 +19,12 @@ LogService.AddLogAdapter(new BasedSerilogAdapter(serilogLogger));
builder.Logging.ClearProviders();
builder.Logging.AddDotBasedLoggerProvider(LogService.Options);
/*builder.Services.AddAuthentication(options =>
{
options.DefaultScheme = BasedAuthenticationDefaults.BasedAuthenticationScheme;
options.DefaultChallengeScheme = BasedAuthenticationDefaults.BasedAuthenticationScheme;
}).AddCookie();*/
// Add services to the container.
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
@@ -25,6 +32,8 @@ builder.Services.AddSwaggerGen();
var app = builder.Build();
await SeedAuthorityData.InitializeData(app.Services);
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{