- Issue created by @brianperry
- Assigned to brianperry
We currently only support the client_credentials grant for OAuth. The simple OAuth module deprecated the password grant, but a re-implementation with sizable usage exists: https://www.drupal.org/project/simple_oauth_password_grant β
Adding support for this could address some common use cases, including some requests from the community.
Introduce a grant_type option for OAuth authentication. We should make this optional and default to 'client_credentials' for backwards compatibility.
From the password grant module page:
You can then obtain an access token by requesting it with the following payload:
{
"grant_type": "password",
"client_id": "__your-client-id__",
"client_secret": "__your-client-secret__",
"username": "drupal_username_or_email",
"password": "drupal_password"
}
Once we get a token, we should handle it the same way we do for tokens from the client_credentials grant.
* Implement changes.
* Update tests
* Update docs
Introduces an optional 'grant type' for OAuth authentication.
Active
Code