-
Notifications
You must be signed in to change notification settings - Fork 401
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
JwtSecurityTokenConverter initial commit #2117
Conversation
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs
Outdated
Show resolved
Hide resolved
test/System.IdentityModel.Tokens.Jwt.Tests/JwtSecurityTokenConverterTests.cs
Outdated
Show resolved
Hide resolved
src/System.IdentityModel.Tokens.Jwt/JwtSecurityTokenConverter.cs
Outdated
Show resolved
Hide resolved
return new JwtSecurityToken(header, payload); | ||
} | ||
|
||
throw new ArgumentException("token.EncodedToken or token.Header and token.Payload must be set"); |
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.
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.
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 see. Thanks.
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.
a630cc9
to
55da154
Compare
src/System.IdentityModel.Tokens.Jwt/JwtSecurityTokenConverter.cs
Outdated
Show resolved
Hide resolved
{ | ||
return new JwtSecurityToken(token.EncodedToken); | ||
} | ||
else if (token.Header != null && token.Payload != null) |
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.
If we fix the bug where JsonWebToken.EncodedToken is never null, we will not need this.
Also, you could write: new JwtSecurityToken(token.EncodedHeader + "." token.EncodedPayload + ".")
Wilson bug: #2065
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.
Believe this is addressed, @brentschmaltz what do you think?
6dc0356
to
98140dc
Compare
Co-authored-by: Keegan Caruso <[email protected]>
Co-authored-by: Keegan Caruso <[email protected]>
Co-authored-by: Keegan Caruso <[email protected]>
Co-authored-by: Keegan Caruso <[email protected]>
No description provided.