Skip to content

Restrict grant types #729

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

Merged
merged 7 commits into from
Jun 4, 2018
Merged

Conversation

willtj
Copy link

@willtj willtj commented May 31, 2018

Following on from #725.

Adds the ability for OAuth clients to be restricted to specific grant types. Clients without a grant_types array will still be allowed any grant type, subject to the existing restrictions.

For example, existing checks allow any third party client to request an authorization_code grant. This change would allow a client to be set up in such a way that it may be used for a client_credentials grant type but not authorization_code. A similar implementation can be seen in:

  • Auth0: docs
  • The bshaffer/oauth2-server-php library: docs and code

@taylorotwell taylorotwell merged commit 4de8d6c into laravel:6.0 Jun 4, 2018
@taylorotwell
Copy link
Member

Thanks. Would it make sense to add grant_types as a cast on the Client Eloquent model?

@willtj
Copy link
Author

willtj commented Jun 5, 2018

Good point - PR coming up.

@mro95
Copy link

mro95 commented Aug 3, 2022

This feature is missing documentation. Also the grant_types column is missing in the migration.
Wouldn't it be nice that the artisan command passport:client gets an option for allowed grant_types?

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.

3 participants