Authorization key: Swagger-ui v3.0.2

I am using Swagger-ui version 3.0.2 , I hosted it locally and gave it my Json file and API, it opens document fine and lists all method in json file, after I put basic authentication in it, I made changes to JSON file changes

"securityDefinitions": {
"basic": {
        "type": "basic",
        "description": "Basic Authentication"
    },
    "token": {
        "type": "apiKey",
        "description": "API Token Authentication",
        "name": "apiKey",
        "in": "header"
    }
},

      

when i authenticate a user with username and password or using toen it shows it is authenticated but hasn't added the authentication key with CURL Swagger-ui 3.0.2 here is the attachment where the header is missing in the call. for reference. screenshot of swagger-ui2.2.8 version.enter image description here

Can anyone please explain how to attach authorization in header in swagger-ui version 3.0.2.

+3
swagger-ui swagger-2.0


source to share


No one has answered this question yet

Check out similar questions:

6
SwashBuckle / Swagger - OAuth resource owner password stream
4
Mark the method anonymous: swagger version 3.0.2
3
API key in header with swashbuckle
2
How to auto-resolve all endpoints using Swagger interface?
1
Response with swagger-ui headers
1
How to automatically get an authorization token in Swagger?
1
Swagger basic authentication issue
0
enable basic authentication in swagger ui
0
Writing a Swagger API definition that uses a token as the username of the main authentication header
0
Correct method for defining bearer token authentication in Swagger 2.0



All Articles
Loading...
X
Show
Funny
Dev
Pics