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

Code refactoring #64

Open texpert opened 8 years ago

texpert commented 8 years ago

Added the call to Doorkeeper's authenticate_admin initializer block to valid_doorkeeper_token? method.

This make it possible to define the block in such a way in config/initializers/doorkeeper.rb:

admin_authenticator do |doorkeeper_token|
    User.find(doorkeeper_token.resource_owner_id).admin?
end
texpert commented 8 years ago

Also, removed an obsolete string interpolation in set_auth_strategy method.

texpert commented 8 years ago

@antek-drzewiecki . did you have a chance to take a glance at this?

texpert commented 8 years ago

@antek-drzewiecki , what do you think? This seems to be ready.

LeFnord commented 7 years ago

@antek-drzewiecki any progress on it?

texpert commented 7 years ago

@LeFnord , it's silence here since September, 2016.

Actually, with this merged PR to Doorkeeper, https://github.com/doorkeeper-gem/doorkeeper/pull/915 , WneBouncer became redundant, indeed.