Skip to content
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

Add missing validation against allow_grant_flow_for_client option #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marco-nicola
Copy link
Collaborator

Closes #14

@marco-nicola marco-nicola self-assigned this Jun 30, 2023
@marco-nicola marco-nicola linked an issue Jun 30, 2023 that may be closed by this pull request
Comment on lines +127 to +136

[Unreleased]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v1.0.3...HEAD
[1.0.3]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v1.0.2...v1.0.3
[1.0.2]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v1.0.1...v1.0.2
[1.0.1]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v0.2.1...v1.0.0
[0.2.1]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/exop-group/doorkeeper-device_authorization_grant/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/exop-group/doorkeeper-device_authorization_grant/releases/tag/v0.1.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's all that suddenly coming from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I realized that we used "[links]" for version's heading, but they were not pointing to anything. That's a typical destination.

About this change, I admit I've been a little insolent and didn't bother to comment in the commit message... 😇

@@ -13,6 +13,7 @@ class DeviceAuthorizationRequest < Doorkeeper::OAuth::BaseRequest
attr_accessor :host_name

validate :client, error: :invalid_client
validate :client_supports_grant_flow, error: :unauthorized_client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that other Doorkeeper grants also validate the requested scopes. I suppose we should do that too, even if our own applications don't use them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing allowed grant flows validation configuration
2 participants