-
Notifications
You must be signed in to change notification settings - Fork 790
[13.x] Determine if the client handles the specified grant #1762
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
[13.x] Determine if the client handles the specified grant #1762
Conversation
|
Thanks for submitting a PR! Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface. Pull requests that are abandoned in draft may be closed due to inactivity. |
| protected function grantTypes(): Attribute | ||
| { | ||
| return Attribute::make( | ||
| get: fn (?string $value): array => isset($value) ? $this->fromJson($value) : array_keys(array_filter([ |
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.
get: fn (?string $value): array => !empty($value) ? $this->fromJson($value) : array_keys(array_filter([
When table has data and grant_types column value is empty then isset check returns true and returns null which throws type error as method expects array to return.
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.
What do you mean by empty grant_types? "[]" or "" or anything else?
var_dump($client->attributes['grant_types']);
This is a security enhancements. Determine if the client handles the specified grant before proceeding the request, otherwise respond with
unauthorized_clienterror according to RFC6749 section 5.2.