Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Wilson and IdentityModel dependencies #409

Merged
merged 8 commits into from
Feb 27, 2024
Merged

Update Wilson and IdentityModel dependencies #409

merged 8 commits into from
Feb 27, 2024

Conversation

josephdecock
Copy link
Contributor

@josephdecock josephdecock commented Feb 17, 2024

Updates IdentityModel to our latest preview and wilson to the latest release.

- Pass a Dictionary instead of an anonymous type for jwk claims (needed due to changes in jwt handler)
- replace deprecated IHeaderDictionary.Add with Append
- replace deprecated ValidateToken with ValidateTokenAsync
- tests need to use IdentityServer 7 to get its changes to support new wilson library. This forces us to drop net6.0 and net7.0 from the target frameworks of the dpop test project
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brockallen, when you review this, I want to call this out. I made this change because tests need to use IdentityServer 7 to get its changes that support the new version of wilson.

The tests are creating an IdentityServer test host and then using it to get dpop tokens. The problem is that if our tests use IdentityServer 6.3 but we update the wilson dependency in IM.OC.DPoP, IdentityServer will use that wilson version too. Once we update wilson, we need the updated version of IdentityServer (that uses JsonElements instead of Dictionary<string, object>) in order to deserialize the proof tokens. And IdentityServer 7 of course only targets net8.0. So, this forces us to drop net6.0 and net7.0 from the target frameworks of this test project.

@josephdecock
Copy link
Contributor Author

@brockallen - I needed the wilson updates in order to support trimming in IdTokenValidator and DPoP, so I just went ahead and put it all in one branch. But I'm not going to be adding any more commits now - this is really ready for review.

@brockallen brockallen merged commit 9b48585 into main Feb 27, 2024
3 checks passed
@brockallen brockallen deleted the joe/wilson branch February 27, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants