Skip to content

Commit

Permalink
chore(deps): Upgrade Nuget packages and fix authorization challenge U…
Browse files Browse the repository at this point in the history
…RI (#65)
  • Loading branch information
koalaty-code committed Mar 28, 2022
1 parent 1a028d0 commit 6886752
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.2.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.2.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.14.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Azure.Security.KeyVault.Keys" Version="4.3.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.3.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="6.16.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions AzureKeyVaultEmulator/AzureKeyVaultEmulator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions AzureKeyVaultEmulator/Startup.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.IdentityModel.Tokens.Jwt;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using AzureKeyVaultEmulator.Keys.Services;
using AzureKeyVaultEmulator.Secrets.Services;
Expand Down Expand Up @@ -27,7 +28,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddControllers()
.AddJsonOptions(o =>
{
o.JsonSerializerOptions.IgnoreNullValues = true;
o.JsonSerializerOptions.DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull;
});

services.AddSwaggerGen(c =>
Expand Down Expand Up @@ -63,7 +64,7 @@ public void ConfigureServices(IServiceCollection services)
OnChallenge = context =>
{
context.Response.Headers.Remove("WWW-Authenticate");
context.Response.Headers["WWW-Authenticate"] = "Bearer authorization=\"localhost:5001\", scope=\"foobar\", resource=\"https://some.url\"";
context.Response.Headers["WWW-Authenticate"] = "Bearer authorization=\"https://localhost:5001/foo/bar\", scope=\"foobar\", resource=\"https://some.url\"";
return Task.CompletedTask;
}
};
Expand Down

0 comments on commit 6886752

Please sign in to comment.