Skip to content

Commit

Permalink
Use wilson 8 everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdecock committed Nov 15, 2024
1 parent 472e395 commit 8e2910e
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 23 deletions.
7 changes: 2 additions & 5 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@
<PropertyGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<FrameworkVersion>8.0.1</FrameworkVersion>
<ExtensionsVersion>8.0.0</ExtensionsVersion>

<!-- TODO - we may want to lower the upper bound as we do more testing. -->
<WilsonVersion>[7.1.2,8.0.0)</WilsonVersion>

<WilsonVersion>[8.0.1,9.0.0)</WilsonVersion>
<IdentityServerVersion>7.0.8</IdentityServerVersion>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net9.0'">
<FrameworkVersion>9.0.0</FrameworkVersion>
<ExtensionsVersion>9.0.0</ExtensionsVersion>
<WilsonVersion>8.0.1</WilsonVersion>
<WilsonVersion>[8.0.1,9.0.0)</WilsonVersion>
<IdentityServerVersion>7.0.8</IdentityServerVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\AccessTokenManagement\AccessTokenManagement.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,20 +71,7 @@ public async Task<OpenIdConnectClientConfiguration> GetOpenIdConnectConfiguratio

Authority = options.Authority,
TokenEndpoint = configuration.TokenEndpoint,

// This conditional compilation is required because the
// OpenIdConnectConfiguration type in
// Microsoft.IdentityModel.Protocols.OpenIdConnect has a breaking
// change in version 8.0.0 that library. The revocation endpoint was
// added as a strongly typed property, which means it is no longer
// included in the AdditionalData. In our .NET 9 build, we require
// wilson >8.0.0, and in our .NET 8 build, we require wilson <8.0.0.
#if NET9_0_OR_GREATER
RevocationEndpoint = configuration.RevocationEndpoint,
#else
RevocationEndpoint = configuration.AdditionalData.TryGetValue(OidcConstants.Discovery.RevocationEndpoint, out var value) ? value?.ToString() : null,
#endif

ClientId = options.ClientId,
ClientSecret = options.ClientSecret,
HttpClient = options.Backchannel,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />

<!-- Pinned to avoid conflicts - we bring this in via IdentityServer, and that could conflict with
AccessTokenManagement's depednecy on System.IdentityModel.Tokens.Jwt. -->
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />

<PackageReference Include="RichardSzalay.MockHttp" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public async Task<HttpResponseMessage> LogoutAsync(string? sid = null)
response = await BrowserClient.GetAsync(response.Headers.Location.ToString());
response.StatusCode.ShouldBe((HttpStatusCode)302); // root

response = await BrowserClient.GetAsync(Url(response.Headers.Location.ToString()));
response = await BrowserClient.GetAsync(Url(response.Headers.Location!.ToString()));
return response;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" />
<PackageReference Include="Microsoft.Extensions.Primitives" />
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" />
</ItemGroup>
</Project>

0 comments on commit 8e2910e

Please sign in to comment.