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

Add BannedApiAnalyzers to prevent use of ClaimsIdentity constructors #2778

Merged
merged 3 commits into from
Aug 17, 2024

Conversation

pmaytak
Copy link
Contributor

@pmaytak pmaytak commented Aug 13, 2024

Add BannedApiAnalyzers to prevent use of ClaimsIdentity constructors and enforce use of CaseSensitiveClaimsIdentity, which makes claims retrieval consistent.

The disallowed definitions are contained in BannedSymbols.txt. There is no wildcard to include all constructors for a type, so each one has to be added.

If a banned member is used, the following error is thrown:
RS0030 The symbol has been marked as banned in this project, and an alternate should be used instead.

@pmaytak pmaytak requested a review from a team as a code owner August 13, 2024 07:43
Copy link
Collaborator

@jennyf19 jennyf19 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@pmaytak pmaytak merged commit 34a421f into dev Aug 17, 2024
6 checks passed
@pmaytak pmaytak deleted the pmaytak/bannedapi branch August 17, 2024 03:22
@pmaytak pmaytak added this to the 8.0.2 milestone Aug 20, 2024
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

Successfully merging this pull request may close these issues.

3 participants