question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to specify JWT bearer Type in openapi generation

See original GitHub issue

Hi,

I’m trying to use a @httpBearerAuth trait on my service, that specifies the bearerFormat as JWT. How do I do this using the current trait?

I’d like to generate an openapi specification that has these lines in it:

  securitySchemes:    
    bearerAuth:      
      type: http      
      scheme: bearer      
      bearerFormat: JWT

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jabalsadcommented, Jul 15, 2021

I think it works without this field. Feel free to close this ticket.

0reactions
gosarcommented, Jul 15, 2021

I thought I’d support this via https://github.com/awslabs/smithy/pull/860 but since bearerFormat is specific to OpenAPI felt it doesn’t belong in the httpBearerAuth trait, which is not OpenAPI specific. Since bearerFormat in OpenAPI is only a documentation hint and doesn’t affect client-server interoperability, I’m unsure if this is really needed. @jabalsad if you can confirm you could deploy your API without this field and don’t really need it, I’ll close this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure JWT Authentication for OpenAPI - Baeldung
In this tutorial, we learned how to configure JWT authentication to our OpenAPIs. Swagger-UI provides a tool to document and test the REST...
Read more >
Bearer Authentication - Swagger
In OpenAPI 3.0, Bearer authentication is a security scheme with type: http and scheme: bearer . You first need to define the security...
Read more >
Use JWT Bearer Authorization in Swagger OpenAPI
Blog / Use JWT Bearer Authorization in Swagger OpenAPI ... First, we need to configure JWT based authentication in our project.
Read more >
openapi - How can I represent 'Authorization: Bearer <token ...
Important: In this example, API consumers must include the "Bearer" prefix as part of the token value. For example, when using Swagger UI's...
Read more >
JWT bearer Authorization in Swagger OpenAPI | TheCodeBuzz
JWT Authorization Token in Swagger · Getting started · Step 1- Define AddSecurityDefinition · Step 2- Add AddSecurityRequirement · What is JWT (JSON ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found