From 3f72e7a98cd02b6e71f83de5301247659828cb0e Mon Sep 17 00:00:00 2001 From: syukoGit Date: Tue, 11 Jul 2023 16:37:38 +0200 Subject: [PATCH 1/3] fix(swagger): Define Bearer as security scheme to swagger --- FirefighterStats/Server/Program.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FirefighterStats/Server/Program.cs b/FirefighterStats/Server/Program.cs index 596bab7..3ad56c6 100644 --- a/FirefighterStats/Server/Program.cs +++ b/FirefighterStats/Server/Program.cs @@ -51,13 +51,13 @@ builder.Services.AddSwaggerGen(static c => { - c.AddSecurityDefinition("basic", new OpenApiSecurityScheme + c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme { Name = "Authorization", Type = SecuritySchemeType.ApiKey, - Scheme = "basic", + Scheme = "Bearer", In = ParameterLocation.Header, - Description = "Basic Authorization header using the Bearer scheme.", + Description = "Bearer Authorization header using the Bearer scheme.", }); c.AddSecurityRequirement(new OpenApiSecurityRequirement @@ -68,7 +68,7 @@ Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, - Id = "basic", + Id = "Bearer", }, }, Array.Empty() From 6969a7aeef4fd64b45c2ae4709c1f806dfbbbd59 Mon Sep 17 00:00:00 2001 From: syukoGit Date: Tue, 11 Jul 2023 16:40:36 +0200 Subject: [PATCH 2/3] fix(cors): UseRouting on App --- FirefighterStats/Server/Program.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/FirefighterStats/Server/Program.cs b/FirefighterStats/Server/Program.cs index 3ad56c6..ed89155 100644 --- a/FirefighterStats/Server/Program.cs +++ b/FirefighterStats/Server/Program.cs @@ -90,11 +90,12 @@ app.UseHttpsRedirection(); +app.UseCors(static c => c.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); +app.UseRouting(); + app.UseAuthentication(); app.UseAuthorization(); -app.UseCors(static c => c.AllowAnyOrigin().AllowAnyMethod().AllowAnyHeader()); - app.MapControllers(); app.Run(); From 6c3b0541f9f1917c5e2ab63ac73be92be1ee9648 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Aug 2023 04:38:51 +0000 Subject: [PATCH 3/3] chore(deps): bump @adobe/css-tools in /FirefighterStats/App Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.1.0 to 4.3.1. - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md) - [Commits](https://github.com/adobe/css-tools/commits) --- updated-dependencies: - dependency-name: "@adobe/css-tools" dependency-type: indirect ... Signed-off-by: dependabot[bot] --- FirefighterStats/App/package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/FirefighterStats/App/package-lock.json b/FirefighterStats/App/package-lock.json index da9bedf..c3dda5d 100644 --- a/FirefighterStats/App/package-lock.json +++ b/FirefighterStats/App/package-lock.json @@ -38,9 +38,9 @@ } }, "node_modules/@adobe/css-tools": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.1.0.tgz", - "integrity": "sha512-mMVJ/j/GbZ/De4ZHWbQAQO1J6iVnjtZLc9WEdkUQb8S/Bu2cAF2bETXUgMAdvMG3/ngtKmcNBe+Zms9bg6jnQQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==" }, "node_modules/@ampproject/remapping": { "version": "2.2.0", @@ -16968,9 +16968,9 @@ }, "dependencies": { "@adobe/css-tools": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.1.0.tgz", - "integrity": "sha512-mMVJ/j/GbZ/De4ZHWbQAQO1J6iVnjtZLc9WEdkUQb8S/Bu2cAF2bETXUgMAdvMG3/ngtKmcNBe+Zms9bg6jnQQ==" + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==" }, "@ampproject/remapping": { "version": "2.2.0",