Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | oauth-add-consumer-via-drush-2765511-4.patch | 2.46 KB | chapabu |
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #3
jrockowitz CreditAttribution: jrockowitz as a volunteer commentedComment #4
chapabu CreditAttribution: chapabu at Inviqa commentedI 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 thanuser-oauth-consumer
to make it more in line withuser-add-role
.Comment #5
chapabu CreditAttribution: chapabu at Inviqa commented