Skip to content

Swagger has no Bearer auth scheme configured #45

Description

@umerfaruk

Summary

`AddSwaggerGen()` (src/Inshapardaz.Api/Program.cs:86) is called with no `AddSecurityDefinition`/`AddSecurityRequirement` for the JWT Bearer scheme.

Impact

Swagger UI can't be used to call authenticated endpoints (poor developer experience), and the generated spec gives consumers no documented indication of which endpoints require auth or which roles they need.

Suggested fix

Add a Bearer security definition/requirement to the Swagger generation config so `Authorize` works in Swagger UI and the spec documents auth requirements per endpoint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions