RicoSuter/NSwag
View on GitHubOperationSecurityScopeProcessor ignores AllowAnonymousAttribute
Open
#1,195 opened on Feb 15, 2018
help wantedtype: enhancement
Repository metrics
- Stars
- (6,291 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
OperationSecurityScopeProcessor currently only looks for AuthorizeAttribute but ignores AllowAnonymousAttribute which is designed to override AuthorizeAttribute when both are declared.
So it is valid to declare AuthorizeAttribute on the entire controller and opt-out on single actions using AllowAnonymousAttribute. It's even valid to declare AuthorizeAttribute on a base controller type and AllowAnonymousAttribute on a derived controller type.