Skip to content

Commit aea5550

Browse files
authored
Features/move audience configuration (#9)
* Reduce logo size and use markdown image link * Update NuGet package ranges * Move audience configuration * Bump version
1 parent c75df91 commit aea5550

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# <img src="logo.png" title="JWT Guard logo" height="75" align="center"> JWT Guard
1+
# ![JWT Guard logo](logo-75.png "JWT Guard logo") JWT Guard
22

33
JWT Guard is a free, open source, test suite written in C# for testing the security of JSON Web Token (JWT) implementations.
44
It is designed to be used primarily by developers to test if their ASP.NET Core Web API's are properly validating JWT access tokens.

logo-75.png

14.7 KB
Loading

src/JWTGuard.SampleApi/JWTGuard.SampleApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="[8.*,9.0.0)" />
10+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="[8.0.10,9.0.0)" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

src/JWTGuard.Template.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<PackageType>Template</PackageType>
5-
<PackageVersion>1.0.0</PackageVersion>
5+
<PackageVersion>1.0.1</PackageVersion>
66
<PackageId>JWTGuard.Template</PackageId>
77
<Title>JWT Guard Test Suite</Title>
88
<Authors>Wesley Cabus</Authors>
@@ -25,6 +25,7 @@
2525
<Content Include="JWTGuard\**\*" Exclude="JWTGuard\**\bin\**;JWTGuard\**\obj\**;JWTGuard\**\Properties\**" />
2626
<Compile Remove="**\*" />
2727
<None Include="icon.png" Pack="true" PackagePath="\" />
28+
<None Include="..\logo-75.png" Pack="true" PackagePath="\" />
2829
<None Include="..\README.md" Pack="true" PackagePath="\" />
2930
</ItemGroup>
3031

src/JWTGuard/Helpers/TargetApiWebApplicationFactory.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ protected override void ConfigureWebHost(IWebHostBuilder builder)
7979
services.Configure<JwtBearerOptions>(JwtBearerDefaults.AuthenticationScheme, options =>
8080
{
8181
options.Authority = TestSettings.CurrentTestSettings.DefaultIssuer;
82-
options.Audience = TestSettings.CurrentTestSettings.DefaultAudience;
8382
options.TokenValidationParameters.ValidIssuer = TestSettings.CurrentTestSettings.DefaultIssuer;
8483
});
8584
});

src/JWTGuard/JWTGuard.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Duende.IdentityServer" Version="[7.*,8.0.0)" />
13-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.*,9.0.0)" />
14-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="[17.*,18.0.0)" />
15-
<PackageReference Include="xunit" Version="[2.*,3.0.0)" />
16-
<PackageReference Include="xunit.runner.visualstudio" Version="[2.*,3.0.0)">
12+
<PackageReference Include="Duende.IdentityServer" Version="[7.0.8,8.0.0)" />
13+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="[8.0.10,9.0.0)" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="[17.11.1,18.0.0)" />
15+
<PackageReference Include="xunit" Version="[2.9.2,3.0.0)" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="[2.8.2,3.0.0)">
1717
<PrivateAssets>all</PrivateAssets>
1818
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1919
</PackageReference>

src/JWTGuard/TestSettings.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ static TestSettings()
1616
// Override the default test settings here
1717
// CurrentTestSettings = DefaultTestSettings with
1818
// {
19-
// TargetUrl = "/weatherforecast",
20-
// ValidTokenTypes = ["at+jwt"],
21-
// InvalidTokenTypes = ["none", "jwt"],
19+
// TargetUrl = "/your-api-target-endpoint",
20+
// DefaultAudience = "my-api",
21+
// AllowedAudiences = ["my-api"]
2222
// };
2323
}
2424

0 commit comments

Comments
 (0)