antek-drzewiecki / wine_bouncer

A Ruby gem that allows Oauth2 protection with Doorkeeper for Grape Api's
MIT License
112 stars 58 forks source link

Swagger JSON not available with protected auth strategy #53

Open penso opened 8 years ago

penso commented 8 years ago

Hi everyone,

As explained in the title, my swagger json to be used with swagger-ui isn't publicly available with protected auth strategy. I want to enable protected auth strategy because all my API endpoints are supposed to be protected, but I still want to have public documentation.

How can I achieve that? Thanks.

antek-drzewiecki commented 8 years ago

Currently you can not, you need to specify each endpoint right now using the swagger strategy. You gave me some ideas, and I will be rewriting the authentication to provide the safety you requested.

Do you think the protected strategy each endpoint should be default protected with the Doorkeeper's default configured tokens?

penso commented 8 years ago

I'd expect using the Doorkeeper's default configured scope if none defined, but I'd also expect to be able to define it as an optional parameter to auth strategy.