| 1 |
Yahoo! Browser-Based Authentication for Drupal
|
| 2 |
|
| 3 |
Author: Jason Levitt
|
| 4 |
Date: September 18th, 2006
|
| 5 |
Version: 1.0
|
| 6 |
|
| 7 |
Requirements
|
| 8 |
------------
|
| 9 |
* Drupal 4.7.x
|
| 10 |
* PHP4 or PHP5
|
| 11 |
* PHP Curl extension
|
| 12 |
|
| 13 |
Overview
|
| 14 |
---------
|
| 15 |
|
| 16 |
This first version of Yahoo_bbauth for Drupal lets new users login to your Drupal site using their Yahoo login credentials. Drupal accounts are automatically created using the username
|
| 17 |
[userhash]@yahoo . The userhash is a unique Yahoo identifier that is tied to your Yahoo! user id.
|
| 18 |
|
| 19 |
This module makes use of Yahoo's Browser Based Authentication -- a free service. For details on Browser Based Authentication, see: http://developer.yahoo.com/auth
|
| 20 |
|
| 21 |
Install
|
| 22 |
-------
|
| 23 |
|
| 24 |
1. Upload the yahoo_bbauth folder to the Drupal modules/ directory.
|
| 25 |
|
| 26 |
2. Activate the module via the Drupal module configuration menu:
|
| 27 |
"administer >> settings >> modules"
|
| 28 |
|
| 29 |
3. Set the Appid and Secret in your settings: "administer >> settings >> yahoo_bbauth"
|
| 30 |
See "Getting a Yahoo! Application ID and Secret" below.
|
| 31 |
|
| 32 |
4. In "administer >> settings >> users" make sure this is checked:
|
| 33 |
"Visitors can create accounts and no administrator approval is required."
|
| 34 |
|
| 35 |
5. In "administer >> blocks", create a "yahoo_bbauth login" block.
|
| 36 |
|
| 37 |
6. Click on the Login link on your home page and login using a Yahoo userid and password.
|
| 38 |
|
| 39 |
Getting a Yahoo! Appid and Secret
|
| 40 |
------------------------------------------
|
| 41 |
|
| 42 |
Get your application ID and secret by registering here (it's free!):
|
| 43 |
|
| 44 |
https://developer.yahoo.com/wsregapp/index.php
|
| 45 |
|
| 46 |
When you fill out the registration form, if your site uses
|
| 47 |
"clean URLs", then make your "Web Application URL"
|
| 48 |
|
| 49 |
[path to your Drupal site]/yahoo_bbauth_login
|
| 50 |
|
| 51 |
Otherwise, the "Web Application URL" should be
|
| 52 |
|
| 53 |
[path to your Drupal site]/?q=yahoo_bbauth_login
|
| 54 |
|
| 55 |
So, if your Drupal site is located at http://yourdomain.com/somedir, then
|
| 56 |
you put either http://yourdomain.com/somedir/yahoo_bbauth_login as your Web Application URL, or http://yourdomain.com/somedir/?q=yahoo_bbauth_login, depending on whether
|
| 57 |
your site uses "clean URLs" or not.
|
| 58 |
|
| 59 |
Also, select the radio button labeled: "I want to use Browser Based Authentication for user authentication but I don't need to access a specific Yahoo! property"
|
| 60 |
|
| 61 |
Note
|
| 62 |
-----
|
| 63 |
The userhash is unique for each Yahoo! user id, but the userhash is tied to the Application ID and Secret. If these values change, then the userhash value will change. If you change the path to your Drupal site (example: http://www.mysite.com/mysite changed to http://www.mysite.com/mysite/new), then you will need to register for a new Application ID and Secret using that path. The computed userhash values, while still unique, will be different. Since the usernames are [userhash]@yahoo, they will require migration to the new userhash values.
|
| 64 |
|
| 65 |
Another Note
|
| 66 |
------------
|
| 67 |
If your site has caching enabled, you should set it to cache the front page for
|
| 68 |
10 minutes or less. Otherwise, the authorization link will time out and
|
| 69 |
be unuseable until the cache refreshes.
|
| 70 |
|
| 71 |
Patch
|
| 72 |
-----
|
| 73 |
In Drupal 4.73 (and probably 4.70-4.72), this patch fixes irritating user interface bugs in Drupal's remote authentication dialogs: http://drupal.org/node/80819
|
| 74 |
Not mandatory, but probably a good idea to apply anyway.
|
| 75 |
|