-
Notifications
You must be signed in to change notification settings - Fork 428
Add LegacyBaseUrlEncoder #3238
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
Add LegacyBaseUrlEncoder #3238
Conversation
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
#else | ||
Decode(strSpan, output, needReplace, decodedLength); | ||
#endif | ||
LegacyBase64UrlEncoder.Decode(strSpan, output); | ||
} | ||
|
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.
nit: Remove extra line
#endif | ||
} | ||
#endif | ||
|
||
#if NETCOREAPP | ||
[SkipLocalsInit] |
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.
nit: Remove extra line on Ln172, Ln142
SummarySummary
CoverageMicrosoft.IdentityModel.JsonWebTokens - 80.3%
|
/// <summary> | ||
/// Encodes and Decodes strings as base64url encoding. | ||
/// </summary> | ||
public static class LegacyBase64UrlEncoder |
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.
This class should be internal if possible
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 don't think we should take this change.
- We already have 2 classes related to this - Base64UrlEncoding and Base64UrlEncoder. Adding a third one, I think makes this more complex.
- Base64UrlEncoder still has some TFM flags, so it's still a bit complicated.
- Moving methods to the LegacyBaseUrlEncoder, I think, also adds complexity to the public/internal API. We have to make sure we don't change it for the Base64UrlEncoder class because some methods are used in our other SDKs, which could cause the version discrepancy issues we had.
Closing due to Peter's comment + overcomplicating the code. |
Add LegacyBaseUrlEncoder
Summary of the changes (Less than 80 chars)
This PR is a follow up to: #3220
It was created in response to this comment: #3220 (comment)
This PR does two things:
Fixes #3240 (in this specific format)