RicoSuter/NSwag

OperationSecurityScopeProcessor looks at Roles but not Policy in AuthorizeAttribute

Open

#1,674 opened on Oct 18, 2018

 (1 comment) (0 reactions) (0 assignees)C# (1,357 forks)batch import
help wantedproject: NSwag.SwaggerGenerationtype: enhancement

Repository metrics

Stars
 (7,359 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

OperationSecurityScopeProcessor looks at Roles of an AuthorizeAttribute but ignores it if there are no roles given. It does not work if the AuthorizeAttribute has a Policy property but no Roles.

How does this work with https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-2.1?

Contributor guide