Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Support for .NET 8 #44

Merged
merged 13 commits into from
Nov 28, 2023
Merged

Support for .NET 8 #44

merged 13 commits into from
Nov 28, 2023

Conversation

josephdecock
Copy link
Member

This PR adds support for .NET 8 while keeping support for .NET 6.

  • Target both net6.0 and net8.0 in library projects and test project
  • Use conditional compilation to use the .NET 8 TimeProvider when it is available
  • Use conditional dependencies in proj file and a Directory.build.targets
  • All samples updated to .NET 8
  • DPoP bug fixed in .NET 8 (serialization of anonymous types is no longer supported)
    • This fix is backwards compatible, since we just use a dictionary instead of an anonymous type, and that was supported by newtonsoft JSON serialization
  • Polish DPoP sample with cleaner switch to toggle DPoP on and off, and hide links that don't make sense when DPoP is on (e.g., we don't both to have a "manual" sample of a DPoP request, so don't show that link when it is on)
  • Fix up some nullability warnings
  • Update CI to use .NET 8 SDK

Upgrading Microsoft.IdentityModel.JsonWebTokens brings breaking changes
because the underlying json library switched to System.Text.Json, which
is stricter and doesn't support serialization of anonymous types.
…PoP when it is disabled

Add a flag to quickly switch back and forth, and make all the urls update when you switch it.
Also, we didn't bother to demo a call to a DPoP endpoint without this lib, so we just hide those links when it is on
@josephdecock josephdecock linked an issue Nov 20, 2023 that may be closed by this pull request
Only include properties that start with .Token in the token names prop
Hopefully improves clarity of the complex logic around token keys
@brockallen brockallen added this to the 2.1.0 milestone Nov 27, 2023
@josephdecock josephdecock merged commit bc89429 into main Nov 28, 2023
5 checks passed
@brockallen brockallen deleted the net8 branch November 29, 2023 01:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate .NET 8 changes
2 participants