dotnet / dotnet/aspnetcore

Automatically infer `OpenApiSecuritySchemes` from authentication configuration

Open
#39,761 23 comments 36 reactions 0 assignees View on GitHub
area-minimal area-mvc enhancement feature-openapi Priority:1
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

At the moment, when users enable authentication in their ASP.NET apps, they typically have to manually the describe the `OpenApiSecuritySchemes` in their application and the top level and configure `OpenApiSecurityRequirements` for each route that requires authentication and authorization.

We should infer as much of these definitions as possible so users don't need to configure auth twice, once for their application and another time for OpenAPI.

Provide metadata support for parts of the specification documented in https://swagger.io/docs/specification/authentication/.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.