Replace legacy System.IdentityModel.Tokens.Jwt#6356
Merged
david-poindexter merged 1 commit intodnnsoftware:release/10.0.0from Feb 14, 2025
Merged
Replace legacy System.IdentityModel.Tokens.Jwt#6356david-poindexter merged 1 commit intodnnsoftware:release/10.0.0from
david-poindexter merged 1 commit intodnnsoftware:release/10.0.0from
Conversation
6f58f4d to
3927266
Compare
e99f455 to
b8ac135
Compare
b57bebc to
6af6154
Compare
6af6154 to
5e94593
Compare
valadas
approved these changes
Feb 14, 2025
Contributor
valadas
left a comment
There was a problem hiding this comment.
I tested a jwt login and it worked fine, nice one.
2 tasks
2 tasks
valadas
added a commit
to valadas/Dnn.Platform
that referenced
this pull request
Dec 8, 2025
…hange In dnnsoftware#6356 a dependency update made an unintentional breaking change. Instead of the classic "role" claim we now give a "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" claim for roles. JWT in itself has no specs for roles or claims which is left to whatever implementation is targetted like OIDC, OAuth, etc. In DNN context it is a simple JWT but we do provide roles and the new package email values uses microsoft "standard" values that have been around in the Microsoft ecosystem since .Net Framework 4.5 and still lives all the way up to .Net 10. I am not sure if we should support our old "role" claim forever or the Microsoft claim as there are 0 specs about "role". IETF does have a spec about "roles" so if we would change it to that spec, it would still be a breaking change. What this PR does is provide both the old (<=9.13.9) behavior of "role" as well as the new microsoft way which may be better known in the .Net ecosystem. It also adds a deprecation note on both the plain and encrypted token to try and bring attention to this breacking change with the old way being obsolete and removed in v12. Closes dnnsoftware#6829
donker
pushed a commit
that referenced
this pull request
Dec 9, 2025
…hange (#6832) In #6356 a dependency update made an unintentional breaking change. Instead of the classic "role" claim we now give a "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" claim for roles. JWT in itself has no specs for roles or claims which is left to whatever implementation is targetted like OIDC, OAuth, etc. In DNN context it is a simple JWT but we do provide roles and the new package email values uses microsoft "standard" values that have been around in the Microsoft ecosystem since .Net Framework 4.5 and still lives all the way up to .Net 10. I am not sure if we should support our old "role" claim forever or the Microsoft claim as there are 0 specs about "role". IETF does have a spec about "roles" so if we would change it to that spec, it would still be a breaking change. What this PR does is provide both the old (<=9.13.9) behavior of "role" as well as the new microsoft way which may be better known in the .Net ecosystem. It also adds a deprecation note on both the plain and encrypted token to try and bring attention to this breacking change with the old way being obsolete and removed in v12. Closes #6829
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR builds on top of #6350, which upgrades the System.IdentityModel.Tokens.Jwt NuGet package. That package is now marked as "legacy", so this follow-on PR replaces its usage with the recommended Microsoft.IdentityModel.JsonWebTokens package (which was already referenced). This was mostly straightforward, other than the header validation check that needed to be moved around a bit.