swagger-blocks icon indicating copy to clipboard operation
swagger-blocks copied to clipboard

Please add support for bearer auth

Open bobmeister opened this issue 5 years ago • 0 comments

Right now it seems that swagger-blocks only supports security definitions for the OpenAPI ApiKeyAuth and OAuth2 authentication. A very common type of authentication is BearerAuth (a bearer token in an Authorization header).

Can someone please add support for bearer authentication? A security definition might look something like this:

security_definition :bearer do
  key :type, :http
  key :name, :bearer
  key :in,   :header
end

If I try doing this right now I get a modal dialog in Swagger UI when I click on the Authorize button that says:

Available Authorizations

Unknown security definition type http

Again, this would be much appreciated.

bobmeister avatar May 01 '19 05:05 bobmeister