-
Notifications
You must be signed in to change notification settings - Fork 266
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
How can I use the Bearer Authentication for apis? #90
Comments
Definition
use |
I use comment |
Hi, I am very new to this, and for sure I use the wrong syntax!? I'm trying to get the Header value prefixed with @xxiaocheng At way back =), did you find a solution? In // @securityDefinitions.apikey BearerAuth
// @in header
// @name Authorization And then at the routes I added But in the gui I have to add the string The generated files for ex
At Swagger see BearerAuth it seems that you should specify
|
If you want to use with swagger v2.0, then after trying few solutions, it worked for me. |
Server.go At controller: |
To summarize the findings of previous posters:
When using Swagger UI in a browser, you must specify |
Hi, for OpenAPI 2.0 just enter the following comments and generate the docs by swag init.
On Swagger UI in a browser, you must specify the bearer in the value field of the authorization pop up: |
No description provided.
The text was updated successfully, but these errors were encountered: