develop #10

Merged
s426229 merged 80 commits from develop into master 2021-01-27 18:32:19 +01:00
Showing only changes of commit cfb0800065 - Show all commits

View File

@ -42,6 +42,27 @@ namespace Serwer.Api
services.AddSwaggerGen(c => services.AddSwaggerGen(c =>
{ {
c.SwaggerDoc("v1", new OpenApiInfo { Title = "Serwer.Api", Version = "v1" }); c.SwaggerDoc("v1", new OpenApiInfo { Title = "Serwer.Api", Version = "v1" });
var jwtSecurityScheme = new OpenApiSecurityScheme
{
Scheme = "bearer",
BearerFormat = "JWT",
Name = "JWT Authentication",
In = ParameterLocation.Header,
Type = SecuritySchemeType.Http,
Description = "Put **_ONLY_** your JWT Bearer token on textbox below!",
Reference = new OpenApiReference
{
Id = JwtBearerDefaults.AuthenticationScheme,
Type = ReferenceType.SecurityScheme
}
};
c.AddSecurityDefinition(jwtSecurityScheme.Reference.Id, jwtSecurityScheme);
c.AddSecurityRequirement(new OpenApiSecurityRequirement
{
{ jwtSecurityScheme, Array.Empty<string>() }
});
}); });
var hostEnviroment = new HostEnviroment { RootPath = WebRootPath }; var hostEnviroment = new HostEnviroment { RootPath = WebRootPath };