Problem/Motivation

Providing a drush command to create an Oauth consumer would help with automation and third party integration.

For example being able to execute the below commands could be very useful when creating an Oauth/REST account.

drush role-create rest
drush role-add-perm rest 'access content'
drush user-create rest_user --password="!@#$%^"
drush user-add-role rest rest_user
drush user-oauth-consumer rest_user

Proposed resolution

Consider adding drush support for Oauth consumer generation.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

jrockowitz’s picture

Title: Add support for create an Oauth consumer using drush » Add support for creating an Oauth consumer using drush
jrockowitz’s picture

Issue summary: View changes
chapabu’s picture

I recently needed this for a client with multiple sites hosted on Platform.sh. This is what I came up with. We might want list and delete functionality as well, but I guess that's out of the scope of the issue based on the above summary.

Quick note, I went with user-add-oauth rather than user-oauth-consumer to make it more in line with user-add-role.

chapabu’s picture

Status: Active » Needs review