Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Pattern to incorporate auth #76

Closed
avishaan opened this issue Nov 21, 2014 · 7 comments
Closed

Pattern to incorporate auth #76

avishaan opened this issue Nov 21, 2014 · 7 comments

Comments

@avishaan
Copy link

Is there a recommended pattern to incorporate authentication? I usually use passportJS but more generally I just need to call another route before certain routes I have described in my swagger.json. I realize this isn't a question specifically for this library but it's something that might be handy for users switching over to this from vanilla express routes.

@avishaan
Copy link
Author

nvm, found what I was looking for

@avishaan
Copy link
Author

Nvm, couldn't find it. I see the securities object but not sure how to set it up with something like basic auth and passport JS. Any suggestions?

@avishaan avishaan reopened this Nov 21, 2014
@avishaan
Copy link
Author

nvm, found what I was looking for....I think

@Schoonology
Copy link
Contributor

@codehatcher, have we actually solved the problem by documenting the auth integration?

@avishaan
Copy link
Author

avishaan commented Jul 4, 2015

I ended up using my own middleware on the securities object. I think at the time I couldn't find documentation on this. Can you point me to a working example so I can try and incorporate it into my project?

@Schoonology
Copy link
Contributor

I can't, unfortunately. I wound up hacking something together that I'm not sure is entirely idiomatic.

@whitlockjc
Copy link
Member

swagger-security currently has an open issue (#203) that makes auth a little harder to use than it should be. I'm working on this soon. If you have any needs, let me know there.

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

3 participants