-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code refactoring #64
Open
texpert
wants to merge
21
commits into
antek-drzewiecki:master
Choose a base branch
from
texpert:admin_authentication
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Code refactoring #64
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, removed an obsolete string interpolation in set_auth_strategy method. |
This was referenced Aug 9, 2016
@antek-drzewiecki . did you have a chance to take a glance at this? |
… 'false'. Particularily useful when using WineBouncer in the grape-swagger for hiding certain endpoints for different kind of users. In this case oauth2 'false' is set on the GET swagger_doc endpoint making the doorkeeper_access_token available further in the process of building API endpoints.
texpert
force-pushed
the
admin_authentication
branch
from
August 31, 2016 11:18
49d4b33
to
3074ad2
Compare
…16.2 Updated Grape, Rails and Doorkeeper default versions in the Gemfile.
…r's admin authenticator instead of the token. Greatly simplified :swagger AuthStrategy methods.
…eys. Restricted to Grape 0.16 minimum since the new router and syntax.
Also updated in README.md minimal version of Doorkeeper to tested 3.1.0.
@antek-drzewiecki , what do you think? This seems to be ready. |
…t's not this gem's responsibility, no need to override and new exception classes. Removed more obsolete auth_methods.
Modularized AuthStrategies instead of them being instantiated as Classes. The configured auth_strategy is included now into the middleware on WineBouncer initialization, not on every request. DRYed the middleware.
texpert
changed the title
Add analyzing user's admin role to token validation
Code refactoring
Oct 6, 2016
If auth_strategy is protected, inject Doorkeeper's default scopes into :security hash. Set :protected boolean on the route to make it fast available on requests' processing.
Mark endpoint as protected if 'false' scope present. On :protected auth_strategy and empty scopes, use Doorkeeper's default scopes.
Auth strategies could now coexist - configured as an array. Made Rubocop happy. Swagger 2.0 strategy implemented (specs not written yet).
Docs updated.
@antek-drzewiecki any progress on it? |
@LeFnord , it's silence here since September, 2016. Actually, with this merged PR to Doorkeeper, doorkeeper-gem/doorkeeper#915 , WneBouncer became redundant, indeed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: