Skip to content
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

[Bug] Extension method IsNullOrEmpty is public #2651

Open
1 of 14 tasks
Kebechet opened this issue Jun 19, 2024 · 0 comments
Open
1 of 14 tasks

[Bug] Extension method IsNullOrEmpty is public #2651

Kebechet opened this issue Jun 19, 2024 · 0 comments

Comments

@Kebechet
Copy link

Which version of Microsoft.IdentityModel are you using?
I use Microsoft.IdentityModel.Tokens v7.6.1 (latest)

Where is the issue?

  • M.IM.JsonWebTokens
  • M.IM.KeyVaultExtensions
  • M.IM.Logging
  • M.IM.ManagedKeyVaultSecurityKey
  • M.IM.Protocols
  • M.IM.Protocols.OpenIdConnect
  • M.IM.Protocols.SignedHttpRequest
  • M.IM.Protocols.WsFederation
  • M.IM.TestExtensions
  • M.IM.Tokens
  • M.IM.Tokens.Saml
  • M.IM.Validators
  • M.IM.Xml
  • S.IM.Tokens.Jwt

Expected behavior
either method IsNullOrEmpty should be internal or whole CollectionUtilities class should be marked as internal.

Actual behavior
Both class and method in it are public

Possible solution
This would be a breaking change. So please add this to a planning of next major version. Required code change is just changing of a keyword from public to internal

Additional context / logs / screenshots / links to code
Extension method IsNullOrEmpty that is a helper method in your repo in CollectionUtilities.cs is public. It should be internal.

  1. This conflicts with other libraries that contain similar extensions and we have to manually choose which namespace to use. Thanks to this all major refactorings are PITA.
  2. This goes against single-responsibility principle. Because purpose of this library is to provide auth/identity-related methods and not string extensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant