1

I am trying to make my Drupal 7 site a Oauth provider. I have found the Drupal modules for Oauth 1, yet I am having trouble with finding Oauth 2.0 provider modules and I am not sure that Drupal supports Oauth 1.0a.

I found this project at Drupalcode: http://drupalcode.org/project/oauth2.git it supports Oauth 2.0 for Drupal 6. While browsing to the repository I saw the tags: "7.x-1.x-dev" and "7.x-1.x-Rj" (don't know what this Rj stands for..) which made me very happy. So I checked out the code and put that, together with the latest http://code.google.com/p/oauth2-php/ in my Drupal installation. However when I wanted to enable the module in Drupal 7 and it says: "This version is not compatible with Drupal 7.x and should be replaced."

Furthermore, while implementing a OAuth-PHP client for my OAuth 1 setup, I found that Drupal does not return a "verified token". I read somewhere that this is implemented since OAuth 1.0a to fix a security bug. Does Drupal support OAuth 1.0a? If so what am I missing if I don't recieve a Verified token?

Has anyone got any idea if this module should work in Drupal 7? (the tags confuse me) and if not is there another module for Oauth 2.0 for Drupal?

Thank you in advance

2

I think you should try http://drupal.org/sandbox/sadashiv/1857254 for google_oauth2 This module is yet is sandbox but you can give it a try.

1

I successfully used simpleSAMLphp plus the drupalauth simplesaml module (not a Drupal module) to use Drupal as a SAML 2.0 Identity Provider. It's not clear to me whether simpleSAMLphp supports being an OAuth 2 provider (it supports a bunch of protocols), but even if it doesn't, it could be a tool that helps connect the dots.

1

For OAuth 1.0a, you need the OAuth module.

For OAuth2 there were no solutions until recently (the module you mentioned implements draft 10 of the standard. There were 31 drafts before the final version). I have written a new module for that, called OAuth2 Server, and it now has its first release.

1

I spent some days for using Drupal7 as oauth2 provider and successfully implemented. I am sharing two github repositories Drupal repository (oauth2 provider).. database is in database folder

Client code to test oauth2 provider.. this repository contains curl code to test

  • Hi and welcome to Drupal Answers.You could improve your answer by providing more details about the method you used in order to solve this. – Wtower Jan 20 '15 at 12:57
0

I found this Drupal OAuth Server module to be very useful as it allowed me to integrate with many OAuth Clients very easily

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.