-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add a configuration option to support clients that don't require consent #118
feat: add a configuration option to support clients that don't require consent #118
Conversation
5550419
to
bd9c700
Compare
…e consent for internal applications you might want to skip prompting for consent. With this change you can set your clients array like the array below to not prompt users for consent. return array( 'client_id_random_string' => array( 'name' => 'The name of the Client', 'secret' => 'a secret string', 'redirect_uri' => 'https://example.com/redirect.uri', 'grant_types' => array( 'authorization_code' ), 'requires_consent' => false, ),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @lart2150 for the PR! Looks good except a minor suggestion for a stricter check in place.
I can also just push that change myself, but waiting for a bit since I need to consult my colleagues on whether they also think this PR warrants a major bump in version since it introduces a breaking change.
@akirk @psrpinto Looking for your input - this PR changes the constructor signature in AuthenticateHandler (from Even though these classes might not be commonly instantiated directly, do you agree this warrants a major version bump given the breaking API changes? |
At first sight this looks like a good change to me, but indeed, either we make it backwards-compatible (by accepting either an |
Are you targeting php 8 so I could type hint AuthorizeHandler/AuthenticateHandler |
@lart2150 That would be PHP |
Any preference how to handle the change? If we want to keep api compatibility I think we could do AuthorizeHandler I'm not a big fan of using mixed. I can also revert the change to the AuthenticateHandler contractor and convert the array to ClientCredentialsStorage inside the constructor. I think the last option is to go with the api change and bump the version accordingly. |
Sorry for the long wait. Let's just bump the major version. Merging PR. |
for internal applications you might want to skip prompting for consent. With this change you can set your clients array like the array below to not prompt users for consent.