Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

Authorizations support? #62

Open
kenlefeb opened this issue Jul 8, 2014 · 2 comments
Open

Authorizations support? #62

kenlefeb opened this issue Jul 8, 2014 · 2 comments

Comments

@kenlefeb
Copy link

kenlefeb commented Jul 8, 2014

Is there any support for authorizations? I can't find any mention, anywhere on your Github site.

@makotogitdev
Copy link
Collaborator

Apologies for the very late reply. If a method does require authorization, you should see a browser popup asking for your credentials. Swagger-UI project has more information on how to set header parameters if you want to build it in. https://github.com/wordnik/swagger-ui#header-parameters

@kenlefeb
Copy link
Author

No need to apologize... We're all very busy! :)

I wasn't really worried about authenticating from the Swagger-UI, as much as I was looking for the required authorizations to be included in the Swagger JSON.

I couldn't find anything, on my own, so I downloaded your code and defined a couple of attributes that I can put on my classes/methods to specify the authorizations required. (My current project only requires BasicAuth, so I didn't bother supporting OAuth2, since that was significantly more complicated to implement than BasicAuth or ApiKey.)

I'm not particularly proud of my hacked solution, because in my rush to get it working, I had to break from your overall design a bit. If you have a solution, or are planning to add support for authorizations, I'll be very happy to get back to using an unaltered copy of your library!

Thanks!

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

No branches or pull requests

2 participants