* Changed views to have them in the same layout
* Added Authorization
This commit is contained in:
@@ -51,13 +51,11 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
|
||||
builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
|
||||
// Konfiguracja NSwag z obsługą Bearer Token
|
||||
builder.Services.AddOpenApiDocument(config =>
|
||||
{
|
||||
config.Title = "FaKrosnoApi";
|
||||
config.Version = "v1";
|
||||
|
||||
// Dodaj definicję zabezpieczeń Bearer Token
|
||||
config.AddSecurity("Bearer", new OpenApiSecurityScheme
|
||||
{
|
||||
Name = "Authorization",
|
||||
@@ -68,23 +66,22 @@ builder.Services.AddOpenApiDocument(config =>
|
||||
Description = "Wprowadź token JWT w formacie: Bearer {token}"
|
||||
});
|
||||
|
||||
// Zastosuj zabezpieczenia globalnie
|
||||
config.OperationProcessors.Add(new OperationSecurityScopeProcessor("Bearer"));
|
||||
});
|
||||
|
||||
// builder.Services.AddHangfire(config => config
|
||||
// .SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
|
||||
// .UseSimpleAssemblyNameTypeSerializer()
|
||||
// .UseRecommendedSerializerSettings()
|
||||
// .UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions
|
||||
// {
|
||||
// CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
|
||||
// SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
|
||||
// QueuePollInterval = TimeSpan.Zero,
|
||||
// UseRecommendedIsolationLevel = true,
|
||||
// DisableGlobalLocks = true
|
||||
// }));
|
||||
// builder.Services.AddHangfireServer();
|
||||
builder.Services.AddHangfire(config => config
|
||||
.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
|
||||
.UseSimpleAssemblyNameTypeSerializer()
|
||||
.UseRecommendedSerializerSettings()
|
||||
.UseSqlServerStorage(builder.Configuration.GetConnectionString("OrdersManagementConnection"), new SqlServerStorageOptions
|
||||
{
|
||||
CommandBatchMaxTimeout = TimeSpan.FromMinutes(5),
|
||||
SlidingInvisibilityTimeout = TimeSpan.FromMinutes(5),
|
||||
QueuePollInterval = TimeSpan.Zero,
|
||||
UseRecommendedIsolationLevel = true,
|
||||
DisableGlobalLocks = true
|
||||
}));
|
||||
builder.Services.AddHangfireServer();
|
||||
|
||||
builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile),
|
||||
typeof(OrdersManagementMappingProfile));
|
||||
@@ -116,6 +113,6 @@ app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
// app.UseHangfireDashboard();
|
||||
app.UseHangfireDashboard();
|
||||
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user