Skip to content

Add BannedApiAnalyzers to prevent use of ClaimsIdentity constructors#2778

Merged
pmaytak merged 3 commits intodevfrom
pmaytak/bannedapi
Aug 17, 2024
Merged

Add BannedApiAnalyzers to prevent use of ClaimsIdentity constructors#2778
pmaytak merged 3 commits intodevfrom
pmaytak/bannedapi

Conversation

@pmaytak
Copy link
Collaborator

@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
Contributor

@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
@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