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
Adding client id to strong parameters #1296
Merged
nbulaj
merged 1 commit into
doorkeeper-gem:master
from
linhdangduy:add_client_id_to_strong_parameters
Aug 12, 2019
Merged
Adding client id to strong parameters #1296
nbulaj
merged 1 commit into
doorkeeper-gem:master
from
linhdangduy:add_client_id_to_strong_parameters
Aug 12, 2019
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
linhdangduy
force-pushed
the
add_client_id_to_strong_parameters
branch
2 times, most recently
from
August 11, 2019 05:37
36278e3
to
623fadc
Compare
linhdangduy
changed the title
Adding client id to strong parameters and limiting access to attributes of pre_authorization
Adding client id to strong parameters
Aug 11, 2019
linhdangduy
force-pushed
the
add_client_id_to_strong_parameters
branch
from
August 11, 2019 05:44
623fadc
to
292a954
Compare
nbulaj
approved these changes
Aug 11, 2019
linhdangduy
force-pushed
the
add_client_id_to_strong_parameters
branch
from
August 11, 2019 23:12
292a954
to
a3458b0
Compare
Done squash commits to a single 1️⃣commit. |
Hi @linhdangduy . Thanks for the contribution <3 |
edwardkerry
added a commit
to alphagov/signon
that referenced
this pull request
Feb 25, 2020
As of doorkeeper-gem/doorkeeper#1296 Doorkeeper's PreAuthorization controller is no longer passed the Client upon instantiation, but instead retrieves it during validation. To ensure that the we can access the application via the client, we explicitly call pre_auth.authorizable in order to invoke `validate_client` https://github.com/linhdangduy/doorkeeper/blob/a3458b00d89fb79e0f0a4efc733124c3bfe56db6/lib/doorkeeper/oauth/pre_authorization.rb#L71
edwardkerry
added a commit
to alphagov/signon
that referenced
this pull request
Feb 28, 2020
As of doorkeeper-gem/doorkeeper#1296 Doorkeeper's PreAuthorization controller is no longer passed the Client upon instantiation, but instead retrieves it during validation. To ensure that the we can access the application via the client, we explicitly call pre_auth.authorizable in order to invoke `validate_client` https://github.com/linhdangduy/doorkeeper/blob/a3458b00d89fb79e0f0a4efc733124c3bfe56db6/lib/doorkeeper/oauth/pre_authorization.rb#L71
edwardkerry
added a commit
to alphagov/signon
that referenced
this pull request
Feb 28, 2020
As of doorkeeper-gem/doorkeeper#1296 Doorkeeper's PreAuthorization controller is no longer passed the Client upon instantiation, but instead retrieves it during validation. To ensure that the we can access the application via the client, we explicitly call pre_auth.authorizable in order to invoke `validate_client` https://github.com/linhdangduy/doorkeeper/blob/a3458b00d89fb79e0f0a4efc733124c3bfe56db6/lib/doorkeeper/oauth/pre_authorization.rb#L71
edwardkerry
added a commit
to alphagov/signon
that referenced
this pull request
Mar 2, 2020
As of doorkeeper-gem/doorkeeper#1296 Doorkeeper's PreAuthorization controller is no longer passed the Client upon instantiation, but instead retrieves it during validation. To ensure that the we can access the application via the client, we explicitly call pre_auth.authorizable in order to invoke `validate_client` https://github.com/linhdangduy/doorkeeper/blob/a3458b00d89fb79e0f0a4efc733124c3bfe56db6/lib/doorkeeper/oauth/pre_authorization.rb#L71
edwardkerry
added a commit
to alphagov/signon
that referenced
this pull request
Mar 2, 2020
As of doorkeeper-gem/doorkeeper#1296 Doorkeeper's PreAuthorization controller is no longer passed the Client upon instantiation, but instead retrieves it during validation. To ensure that the we can access the application via the client, we explicitly call pre_auth.authorizable in order to invoke `validate_client` https://github.com/linhdangduy/doorkeeper/blob/a3458b00d89fb79e0f0a4efc733124c3bfe56db6/lib/doorkeeper/oauth/pre_authorization.rb#L71
giraffate
added a commit
to giraffate/doorkeeper
that referenced
this pull request
Apr 2, 2020
In doorkeeper-gem#1296, `Doorkeeper::Server#client_via_uid` was removed. However, this method looks public. If this method is used, `NoMethodError` happens when upgrading.
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.
Summary
Adding
client_id
parameter to permitted strong parameters.As the needs of #1287 , in development environment, setting:
to raise error if unpermitted parameters are sent to controller.
But currently, at
authorizations_controller
, the requiredclient_id
parameter is used atserver.client_via_uid
, not included in strong parameter list. So we cannot use above setting.Solving by:
client_id
to permitted parameters. Then get client at pre_authorization, not by usingserver.client_via_uid
.Comment:
client_id
to pre_authorization, this PR facilitate the changes make in Prevent requested scope be empty on authorization request, handle and add description for invalid request error #1277 : easier to handle whenclient_id
parameter is missing (not have to adding more annoyingraise
andrescue
couple -> decrease the codes change)