-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[dotnet] [🚀 Feature]: Consider using the new Base64Url
#14813
Comments
@RenderMichael, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
No dependencies please for simple tasks! I stole this code in part of the #12777. Thanks for highlighting that it is shipped in .net 9. It is not yet clear, what we will do with it. At this moment, maximum what I can propose: just mention that it is available in .net 9 in source code near with link, and... that's it. |
It should be |
Can we add the |
It is more workaround rather than a proper solution, internal classes should be |
I opened #14833 to make these types invisible to IDEs. Alternatively, we can add If that's preferable, I can start experimenting. |
It should be |
This issue has been automatically locked since there has not been any recent activity since it was closed. Please open a new issue for related bugs. |
Feature and motivation
With the recent release of .NET 9, the
Base64Url
type was released. This type fills a common need that .NET developers have, and up until recently, has been implemented, re-implemented, and polyfilled in many projects.Selenium .NET has its own implementation: found here:
https://github.com/SeleniumHQ/selenium/blob/trunk/dotnet/src/webdriver/Internal/Base64UrlEncoder.cs
As the links in that file show, this was ripped from the Azure Active Directory implementation. They recently migrated to using the
Base64Url
type as well: AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#2817Luckily for us, the .NET team released the
Base64Url
type as a .NET Standard 2.0 NuGet package, found here: https://www.nuget.org/packages/Base64UrlWe can take this dependency unconditionally for now, and if/when we support a .NET 9+ TFM, we can conditionally remove the dependency there.
Usage example
The polyfill type
Base64UrlEncoder
ispublic
(should it beinternal
?). Anyone currently relying on it should not be affected though.As noted in the linked PR on Azure AD, there are minor differences in behavior between the
Base64Url
type and theBase64UrlEncoder
type. For Azure AD, it seems like that requires them to keep the type around.For us, we should investigate what exactly those differences are and if it would be acceptable to just use
Base64Url
directly.The text was updated successfully, but these errors were encountered: