Firefox PHP

Module: External Authentication

Posted by Joe Curia 
Re: Module: External Authentication
March 28, 2009 03:19PM
This is working good on Elgg 1.5 except for one thing...

...I'm using an external authentication module on Elgg 1.5 to allow users to login in using their old Elgg 0.9 credentials (as part of a migration process which is also seeing me change the forum over from Vanilla to Phorum. When a new user registers on the new 1.5 site, logs in, and goes to the forum, this works fine. When I created my Phorum account, and then installed this module and overwrote my details from the Elgg site, this worked fine. But Elgg 0.9 users who log in to Elgg 1.5 and then go to the forum are not being recognised as logged in. Yet they are being added to the phorum_users table.

The only differences which may account for the problem are that the users that work have a '1' in the active field of the 'phorum_users' table and the ones that don't work have a '0'. Is that a red herring or am I on to something?
Re: Module: External Authentication
March 28, 2009 03:35PM
Quote
antonchanning
The only differences which may account for the problem are that the users that work have a '1' in the active field of the 'phorum_users' table and the ones that don't work have a '0'. Is that a red herring or am I on to something?

I think I may be onto something. It seems changing the '0' to a '1' in this field allows the user to be a logged in to phorum as well as elgg.
Re: Module: External Authentication
March 28, 2009 06:02PM
Thanks for your pointers in PM Joe. Thanks to your help I realised that the problem was because when I was logging in users from Elgg 0.9 to the new 1.5, I was creating them and returning success, but never validating them. Because they were logging in successfully, this was never a problem on the Elgg site, but it meant they weren't imported to Phorum correctly. I've fixed my Elgg09 PAM Authentication module for Elgg 1.5 to validate the users and now it works fine... :-)
Re: Module: External Authentication
March 30, 2009 04:15PM
Great mod, works wonderful with Drupal, thnx a million Joe!!!

Sergej

------------------------------------------
^AU^ Assassins United
[www.assassinsunited.com]
------------------------------------------
Re: Module: External Authentication
April 08, 2009 02:37PM
I am trying to integrate Phorum into Moodle elearning software using these scripts. Will this script work with this software application? If so has anyone ever looked at a way to integrate a forum board into Moodle, any help would be appreciated.



Edited 1 time(s). Last edit at 05/21/2009 11:53AM by Chris M..
Re: Module: External Authentication
April 08, 2009 09:18PM
When you say that the state is maintained in the database, how is it tied to a particular visitor/computer?

This page in the Moodle developer's wiki talks about cookieless sessions and it sounds like they are treated in the same manner as cookieless sessions in Phorum, a session id is added to the url. It should be easy to grab this id and authenticate the user. You will need to run the session id through the Moodle authentication process to get a username/user_id from the Moodle database.

If you have the time to wait, I will be happy to add this idea to my list of projects, but I will not be able to focus on it any time soon. I will, however, be happy to answer any questions you might have as you work through it.


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: External Authentication
April 22, 2009 04:06PM
I am really lost in this mod .. as I'm not excellent in programming ..
didn't find a way to integrate my external script ..
[www.phorum.org]

can anyone help me out ?
Re: Module: External Authentication
April 30, 2009 10:32AM
Here's a simple plugin for External Authentication that uses Apache authentication from REMOTE_USER and/or PHP_AUTH_USER to determine the currently logged in user.

It just appends "@yourdomain.tld" to the user name to determine the email address. Please edit the hook_user_session_restore.php file to specify your domain unless you also happen to have users @emory.edu.

I realize this is slightly out of scope for the External Authentication module, since it's not really copying information from another application, but it's very useful for environments with a central Kerberos/LDAP/whatever authentication store. It probably should be its own module, if for no other reason than to allow specifying the domain in the module settings admin page. Joe, would you consider allowing plugins to add their own fields to the module settings page?

I'm considering adding support for pulling the user's real name (and possibly user name) from an LDAP directory. Please let me know if you would also find that functionality useful.

EDIT: Please use the latest version, apache_ldap_plugin-0.1.zip instead!



Edited 1 time(s). Last edit at 05/13/2009 02:20PM by ElliotKendall.
Re: Module: External Authentication
April 30, 2009 12:01PM
Thank you for your work in offering this plugin to other Phorum users.

Yes, you can add your own settings fields from a plugin. Check out the base plugin or my Drupal plugin for examples (see the settings.php and settings_post.php files)


Joe Curia (aka Azumandias)
Modules: l0Admin Mass Email00000000l000000Automatic Time Zones000ll.l00000Enhanced Custom Profiles0.00Google Calendar0000l.l000000Post Previews
000000000Admin Security Suite000000000000Check Modules for Upgrades0000External Authentication000000Group Auto-Email00000.00000Private Message Alerts
000000000Attachment Download Counter0000Custom Attachment Icons000ll.ll00Favorite Forums000000.00000Highlighted Search Terms0000Self-Delete Posts Option
000000000Attachment Watermarks0l00000000Custom Language Database00l.l.0Forum Lockdown00000.00000Ignore Forums0000000000000Threaded Tree View
000000000Automatic Message Pruning00.llll.00Easy Color Scheme Manager0l.l00Forum Subscriptions0000lll000Moderated User Group
Templates:lGeneric Integration000000000 0000Simple Rounded000000 00000000Tabbed Emerald
Re: Module: External Authentication
May 06, 2009 04:45PM
I am trying to integrate Phorum into Moodle LMS. I have been able to grab my cookie and retrieve my username and email address from it.

I originally was just trying to just pass the session $user variables over to phorum but the security script from with the Moodle framework were not allowing me to include the config.php file without throwing errors and when I nullified the errors the variable was empty within the external authentication script.

Thanks!



Edited 1 time(s). Last edit at 05/21/2009 11:55AM by Chris M..
Sorry, only registered users may post in this forum.

Click here to login