You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Extension method IsNullOrEmpty is public #2651
Which version of Microsoft.IdentityModel are you using?
I use Microsoft.IdentityModel.Tokensv7.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.
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.
This goes against single-responsibility principle. Because purpose of this library is to provide auth/identity-related methods and not string extensions
Activity
Kebechet commentedon Jul 10, 2024
8.0.0-preview1 is up, PLEASE remove this extension method from there
Kebechet commentedon Jul 10, 2024
Peter (@pmaytak) BrentSchmaltz (@brentschmaltz) Westin Musser (@westin-m) msbw2 Keegan (@keegan-caruso) Franco Fung (@FuPingFranco) Eric Erhardt (@eerhardt) jennyf19 henrikm (@henrik-me)
Kebechet commentedon Jul 11, 2024
Peter (@pmaytak) and jennyf19 Thank you very much! ❤️