Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to support Bearer Authentication? #1100

Closed
arethusa opened this issue Jan 10, 2022 · 3 comments
Closed

Is it possible to support Bearer Authentication? #1100

arethusa opened this issue Jan 10, 2022 · 3 comments

Comments

@arethusa
Copy link

Bearer Authentication is supported by OAS3 and very useful, is it possible to support it?

https://swagger.io/docs/specification/authentication/bearer-authentication/

@ubogdan
Copy link
Contributor

ubogdan commented Jan 15, 2022

You can use Bearer Authentication with OAS2 through apikey annotation. The drawback here is that you need to add the "Bearer" in front of your token value ("Bearer your_auth_token") in the swagger UI.

@securitydefinitions.apikey Authentication
@in header

@daqiancode
Copy link

You can use Bearer Authentication with OAS2 through apikey annotation. The drawback here is that you need to add the "Bearer" in front of your token value ("Bearer your_auth_token") in the swagger UI.

@securitydefinitions.apikey Authentication
@in header

It's not the solution. It's really bad that not support the Bearer, especially in microservice architecucture.

@ubogdan
Copy link
Contributor

ubogdan commented Jul 4, 2022

You can use Bearer Authentication with OAS2 through apikey annotation. The drawback here is that you need to add the "Bearer" in front of your token value ("Bearer your_auth_token") in the swagger UI.

@securitydefinitions.apikey Authentication
@in header

It's not the solution. It's really bad that not support the Bearer, especially in microservice architecucture.

@daqiancode Swagger is OAS2 compliant and the bearer token is supported in the OAS3 spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants