-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Resolve Log authorization detail failure message by override ToString in each Requirement #10822
Conversation
…ders when first routeProvider is not IActionHttpMethodProvider
@wu-yafeng this looks like a reasonable start, do you think you could add some tests to demonstrate what the log output would look like? |
sure |
- Fix requirement ToString format - Add requirement ToString tests - Add Authorization log output tests
@HaoK if we can get this reviewed an in for preview8, awesome. Otherwise it will go to 3.1 |
src/Security/Authorization/Core/src/DenyAnonymousAuthorizationRequirement.cs
Outdated
Show resolved
Hide resolved
src/Security/Authorization/Core/src/ClaimsAuthorizationRequirement.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good except for some minor text changes
Poor english 😢 ,I'll fix it |
- Fix `AssertRequirement.ToString` text and test case. - Fix `DenyAnonymous.ToString` misspell and test case. - Fix `ClaimsAuthorizationRequirement` text and tes case - Update DefaultAuthorizationServiceTests - Update LoggingExtensions log message when authorize fail
@HaoK let's try to close this out now that we're in to the free-for-all 5.0 timeframe ;) |
Thanks @wu-yafeng I had to clean up some minor things and rebased, and merged these changes in PR #15350 |
Log authorization detail failure message by override ToString in each Requirement
Failed Authorization Policy Details in Logs #7789