WIP: duplicate administration layer

This commit is contained in:
Michał Zieliński
2023-11-12 17:54:15 +01:00
parent 3a8fa60aea
commit 5ea180c8b1
3 changed files with 7 additions and 3 deletions

View File

@@ -32,6 +32,7 @@ builder.Services.AddCors(options =>
builder.Services.AddControllers();
builder.Services.AddAuthentication(options =>
{
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
@@ -51,6 +52,7 @@ builder.Services.AddAuthentication(options =>
});
builder.Services.AddAuthentication();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
@@ -60,6 +62,7 @@ builder.Services.AddSingleton(typeof(GoogleDriveHelper));
var app = builder.Build();
app.Use(async (context, next) =>
{
string token = context.Request.Headers["Authorization"].ToString();
@@ -71,6 +74,7 @@ app.Use(async (context, next) =>
await next(context);
});
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{