many changes, also Newtonsoft.Json 13.0.a → 13.0.b
This commit is contained in:
@@ -4,7 +4,7 @@ namespace Sockeye
|
||||
using Microsoft.AspNetCore.Mvc.ApiExplorer;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
using System;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Sockeye.Api.Controllers
|
||||
public async Task<IActionResult> Get()
|
||||
{
|
||||
var report = await _healthCheckService.CheckHealthAsync();
|
||||
Response.Headers.Add("Cache-Control", "no-store, no-cache");
|
||||
Response.Headers.Append("Cache-Control", "no-store, no-cache");
|
||||
return report.Status == HealthStatus.Healthy ? Ok(report.Status.ToString()) : StatusCode(503, report.Status.ToString());
|
||||
}
|
||||
}//eoc
|
||||
|
||||
@@ -11,7 +11,7 @@ using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.OpenApi.Models;
|
||||
using Microsoft.OpenApi;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Swashbuckle.AspNetCore.SwaggerGen;
|
||||
|
||||
@@ -253,16 +253,23 @@ namespace Sockeye
|
||||
Scheme = "bearer" //The name of the HTTP Authorization scheme to be used in the Authorization header. In this case "bearer".
|
||||
});
|
||||
|
||||
c.AddSecurityRequirement(new OpenApiSecurityRequirement{
|
||||
{
|
||||
new OpenApiSecurityScheme{
|
||||
Reference = new OpenApiReference{
|
||||
Id = "Bearer", //The name of the previously defined security scheme.
|
||||
Type = ReferenceType.SecurityScheme
|
||||
}
|
||||
},new List<string>()
|
||||
}
|
||||
});
|
||||
// c.AddSecurityRequirement(new OpenApiSecurityRequirement{
|
||||
// {
|
||||
// new OpenApiSecurityScheme{
|
||||
// Reference = new OpenApiReference{
|
||||
// Id = "Bearer", //The name of the previously defined security scheme.
|
||||
// Type = ReferenceType.SecurityScheme
|
||||
// }
|
||||
// },new List<string>()
|
||||
// }
|
||||
// });
|
||||
|
||||
c.AddSecurityRequirement(document => new OpenApiSecurityRequirement
|
||||
{
|
||||
// "Bearer" must match the name given to AddSecurityDefinition above
|
||||
[new OpenApiSecuritySchemeReference("Bearer", document)] = []
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
services.AddSwaggerGenNewtonsoftSupport();
|
||||
@@ -529,7 +536,7 @@ namespace Sockeye
|
||||
if (!bLocalReportRenderRequest)
|
||||
{
|
||||
context.Response.StatusCode = 401;
|
||||
context.Response.Headers.Add("X-Sockeye-Authorization-Error", "E2004 - Authorization token replaced by more recent login");
|
||||
context.Response.Headers.Append("X-Sockeye-Authorization-Error", "E2004 - Authorization token replaced by more recent login");
|
||||
await context.Response.WriteAsync("E2004 - Authorization token replaced by more recent login");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,35 +18,32 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Bogus" Version="34.0.2" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Bogus" Version="35.6.5" />
|
||||
<PackageReference Include="BouncyCastle.Cryptography" Version="2.7.0" />
|
||||
<PackageReference Include="Enums.NET" Version="4.0.0" />
|
||||
<PackageReference Include="jose-jwt" Version="4.0.0" />
|
||||
<PackageReference Include="Enums.NET" Version="5.0.0" />
|
||||
<PackageReference Include="jose-jwt" Version="5.3.0" />
|
||||
<PackageReference Include="MailKit" Version="4.18.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.5" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="10.0.12" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.12" />
|
||||
<PackageReference Include="Asp.Versioning.Mvc" Version="10.2.1" />
|
||||
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="10.2.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="10.0.12" />
|
||||
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="6.0.5">
|
||||
<PackageReference Include="Microsoft.Extensions.ApiDescription.Server" Version="10.0.12">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="6.0.5" />
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.3.1" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.2.22" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.2.22" />
|
||||
<PackageReference Include="NLog" Version="5.0.0" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.12" />
|
||||
<PackageReference Include="MiniProfiler.AspNetCore.Mvc" Version="4.5.4" />
|
||||
<PackageReference Include="MiniProfiler.EntityFrameworkCore" Version="4.5.4" />
|
||||
<PackageReference Include="NLog" Version="6.2.1" />
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="6.2.1" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="10.0.3" />
|
||||
<PackageReference Include="PuppeteerSharp" Version="7.0.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.4.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUi" Version="6.4.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.4.0" />
|
||||
<PackageReference Include="PuppeteerSharp" Version="25.12.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.8.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="10.2.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="10.2.3" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="10.2.3" />
|
||||
|
||||
<PackageReference Include="TwoFactorAuth.Net" Version="1.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user