Skip to content

Enhancement: Multiple custom authorization headers in Swagger UI #642

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

Closed
jykae opened this issue Apr 11, 2016 · 5 comments
Closed

Enhancement: Multiple custom authorization headers in Swagger UI #642

jykae opened this issue Apr 11, 2016 · 5 comments

Comments

@jykae
Copy link

jykae commented Apr 11, 2016

Behaviour

nayttokuva 2016-04-11 kello 17 35 35

## Suggestion - New type "customHeader" - Button texts "Authorize" -> "Attach/Detach"

Overall functionality works, but when there are multiple custom headers, the name "apiKey" is not clear in user perspective.

@ePaul
Copy link
Contributor

ePaul commented Apr 11, 2016

Sorry, your issue is not clear. Are you suggesting a change in the specification? If so, which one?
Or are you suggesting a problem in Swagger-UI? If the latter, please post it at swagger-api/swagger-ui, not here.

@jykae
Copy link
Author

jykae commented Apr 11, 2016

I am suggesting a better way to define custom headers for spec. The latter is though more Swagger-UI specific, how to represent that in UI.

Maybe even own section for defining possible headers for API requests?

@jykae
Copy link
Author

jykae commented Apr 11, 2016

I try to remember edit the issue description tomorrow morning. I am on mobile currently.
I leave out UI specific things, and post that to Swagger UI.

@webron
Copy link
Member

webron commented Apr 12, 2016

How is that different than specifying API keys? Granted, the name of the authorization scheme should probably change, but other than that it does what you want?

@jykae
Copy link
Author

jykae commented Apr 12, 2016

@webron I get the functionality that I want by adding multiple "apiKey" type headers. So no actual difference there. Maybe if I could define securityDefinition type "customAuth", and include definitions of those two headers to that? How does that sound?

Though we come then to the question if it's necessary for OpenAPI specification to support custom authorization schemes, it's up to you :)

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

4 participants