ruby-grape / grape-swagger-rails

Swagger UI as Rails Engine for grape-swagger gem.
MIT License
252 stars 197 forks source link

Added the token api_auth type #86

Closed Jack12816 closed 5 years ago

Jack12816 commented 6 years ago

Hey guys, first things first: thanks for this great gem!

It would be quite useful to have a new token authentication type, which follows the Rails convention. So the Authorization header looks like this:

Authorization: Token token="WCZZYjnOQFUYfJIN2ShH1iD24UHo58A6TI"

This PR allows the usage of this authentication.

grape-bot commented 6 years ago
1 Message
:book: We really appreciate pull requests that demonstrate issues, even without a fix. That said, the next step is to try and fix the failing tests!

Generated by :no_entry_sign: danger

dblock commented 6 years ago

Something's wrong with the build. Care to fix that? Probably needs some capybara updates and what not. I can merge on green.

Generally this auth business implementation is weird. Swagger ui has a much more sophisticated way to do this in 3.0, someone will have to redo it I think when we get there. There's also a more generic way to handle this via preFetch (eg. https://github.com/artsy/doppler/pull/139).

olleolleolle commented 5 years ago

master should build now, so this PR could be re-based to re-run it.

dblock commented 5 years ago

@Jack12816 Rebase/squash? I'll merge.

Jack12816 commented 5 years ago

Sorry guys I didn't have time to look into the broken build. But I rebased against the latest upstream master right now. Feel free to merge :)

Jack12816 commented 5 years ago

@dblock Is there a release planned for this?

dblock commented 5 years ago

I opened https://github.com/ruby-grape/grape-swagger-rails/issues/93 for the maintainers of this repo. I am just cheerleading.