Open yoda opened 1 year ago
I'll look into this next week.
Hi! Thanks for opening this issue, @yoda.
You are right, the current code is not validating against allow_grant_flow_for_client
option. It looks like an accidental omission.
Adding a validation to the two classes handling the main requests should be enough.
A PR will follow shortly. Please feel free to have a look and see if I forgot something.
Poke
After looking through a few places the available flows validation seems to be missing:
From the client_credentials flow validation:
Which means if you only have client_credentials or authorization_code enabled on a grant_flow on doorkeeper this flow is not honoring the validation. Let me know if I have misunderstood.
https://github.com/doorkeeper-gem/doorkeeper/blob/f02fcb447a0b39c43cae350a600b853a0e69ee60/lib/doorkeeper/oauth/client_credentials/validator.rb#L31 https://github.com/doorkeeper-gem/doorkeeper/blob/f02fcb447a0b39c43cae350a600b853a0e69ee60/lib/doorkeeper/config.rb#L285