-
Notifications
You must be signed in to change notification settings - Fork 409
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
Fix JwtSecurityToken Missing Mapping When Creating a Token. #2578
Conversation
…ub.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet into francofung/FixEncryptionInteropWrapper
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.IdentityModel.Tokens/X509EncryptingCredentials.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerNonParallelRunTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.WithContextSwitches.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.WithContextSwitches.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerNonParallelRunTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenHandlerTests.WithContextSwitches.cs
Outdated
Show resolved
Hide resolved
…dlerNonParallelRunTests.cs Co-authored-by: kellyyangsong <[email protected]>
…dlerTests.WithContextSwitches.cs Co-authored-by: kellyyangsong <[email protected]>
JsonWebToken jsonToken = tokenHandler.ReadToken(token) as JsonWebToken; | ||
|
||
Assert.NotNull(jsonToken); | ||
Assert.Equal(jsonToken._alg, SecurityAlgorithms.RsaOaepKeyWrap); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use jsonWebToken.Alg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The underscore variables should really be private...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was curious why were they not private when working on them? I changed it to use 'Alg' same as in JwtSecurityTokenHandler. Thanks Brent & Peter!
Description
Adds mapping to Algorithm (alg) so it should be one of the registered at IANA "JSON Web Signature and Encryption Algorithms" (https://www.iana.org/assignments/jose/jose.xhtml) as described on topic 4.1.1 of RFC7516 (https://datatracker.ietf.org/doc/html/rfc7516#page-12).
Fixes #2089