Port to D6?

ram0135 - April 23, 2008 - 15:42
Project:Google Apps Authentication
Version:5.x-1.0
Component:Code
Category:feature request
Priority:critical
Assigned:ssnider
Status:needs review
Description

I was wondering if there were any plans to port this module over to Drupal 6. It's such an awesome module that's quite flexible, and would provide a valuable asset to Drupal.

Keep up the good work!

#1

Cwolly - April 26, 2008 - 20:00

Ditto, would love to have this ported.

#2

Cwolly - April 30, 2008 - 19:30
Component:Miscellaneous» Code
Assigned to:Anonymous» Cwolly

I'm working on this. I've never ported anything before, but I'm making headway. I've got most things working but I get access denied on the /admin/settings/googleauth page. Something to do with how 6.2 handles authentication.

/**
* Implementation of hook_menu().
*/
function googleauth_menu() {
  $items['googleauth/signin'] = array(
    'title' => 'Provider',
    'page callback' => 'googleauth_sign_in',
    'access arguments' => array('use googleauth'),
    'type' => MENU_CALLBACK,
   );
  $items['googleauth/signout'] = array(
    'title' => 'Google Sign Out',
    'page callback' => 'googleauth_sign_out',
    'access arguments' => array('use googleauth'),
    'type' => MENU_CALLBACK
   );
  $items['admin/settings/googleauth'] = array(
    'title' => 'googleauth module settings',
    'description' => 'googleauth configuration settings for file paths',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('googleauth_adminpage'),
    'access arguements' => array('access administration pages'),
    'type' => MENU_NORMAL_ITEM,
   );
 
  return $items;
}

Any help would be appreciated.

#3

ssnider - April 30, 2008 - 19:38
Priority:normal» critical
Assigned to:Cwolly» ssnider

Sorry for the communications lapse -- I definitely plan to attempt a port. I'd be interested in looking at anyones code that even partially implements a port.

#4

ssnider - April 30, 2008 - 19:42

This is probably due to 'access administration pages' no longer being the admin privilege in drupal 6. if you can look in your db and see what the new value is, the code should start working.

#5

Kirok - April 30, 2008 - 23:21

Okay I'm entirely new to this stuff and to be honest I'm just playing around but try this for the auth part:

/**
* Implementation of hook_menu().
*/
function googleauth_menu()
{
$items = array();
 
$items['googleauth/signin'] = array(
'title' => 'Provider',
'page callback' => 'googleauth_sign_in',
'access arguments' => array('use googleauth'),
'type' => MENU_CALLBACK
);
$items['googleauth/signout'] = array(
'title' => 'Google Sign Out',
'page callback' => 'googleauth_sign_out',
'access arguments' => array('use googleauth'),
'type' => MENU_CALLBACK
);
$items['admin/settings/googleauth'] = array(
'title' => 'googleauth module settings',
'description' => 'googleauth configuration settings for file paths',
'page callback' => 'drupal_get_form',
'page callback arguments' => 'googleauth_adminpage',
'access arguments' => array('access administration pages'),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}

It still generates, some errors; different errors but we could do this conversion piece by piece.

#6

Cwolly - June 11, 2008 - 12:55

I've been having a time getting this working in Drupal 6. Anyone make progress? I have a testing environment set up if anyone needs code tested. I can't seem to it to work with Drupal 6.2.

#7

Cwolly - June 11, 2008 - 19:30

I think I got this working in Drupal 6, will do further testing tomorrow and submit patch.

#8

Cwolly - June 12, 2008 - 14:12
Status:active» needs review

Ok, so I've implemented the code for the googleauth.module and it is working with drupal 6. Submitting for review. This patch is working, but keep in mind you need to modify your googleauth.info to reflect Drupal 6 core for this to work.

Also, the bugs such as the SAML request bug that was never fixed in the 5.x version of this module are still there, as it is beyond the scope of my knowledge.

Patch incoming...

AttachmentSize
googleauth.module.patch 10.45 KB

#9

rdlugosz - December 8, 2008 - 11:45

Seems this has gone stale... any chance we can see this updated officially for Drupal 6? If not, how do I apply the patch? Standard unix patch command against the original sources?

#10

mhenstell - January 9, 2009 - 22:44

Running the patch... seems to work, when I enter my google docs subdomain I am forwarded to the signin page, I login, but I am left in drupal. After signin I should be redirected to google apps, correct?

#11

jfha73 - February 20, 2009 - 19:29

I ran the patch, but it says not compatible with Drupal 6.9

#12

jfha73 - March 16, 2009 - 18:51

Has anybody checked this: http://drupal.org/project/google_auth

 
 

Drupal is a registered trademark of Dries Buytaert.