Moodle

Integrate OpenID into Moodle core

Details

  • Affected Branches:
    MOODLE_19_STABLE

Description

Moodle should support OpenID out of the box.

Stuart Metcalfe has made a good start here: http://codebrowse.launchpad.net/~info-pdl/moodle-openid/trunk/files

Unfortunately his design is spread across many directories when it really should be completely encapsulated in auth/openid. All file storage should also be in dataroot - Moodle code should never be allowed to write to the Moodle directories.

So some work needs to be done here before it can be added to core.

Issue Links

Activity

Hide
Martin Dougiamas added a comment -

auth modules now support db folder (because of MDL-12904)

Show
Martin Dougiamas added a comment - auth modules now support db folder (because of MDL-12904)
Hide
David Horat added a comment -

Just for curiosity: how is this project going on?

Show
David Horat added a comment - Just for curiosity: how is this project going on?
Hide
Martin Dougiamas added a comment -

Nowhere currently - .... hang on .... what's that sound ...?

It sounds like "David .... David ......." I think this project is calling you, David!

Show
Martin Dougiamas added a comment - Nowhere currently - .... hang on .... what's that sound ...? It sounds like "David .... David ......." I think this project is calling you, David!
Hide
Stuart Metcalfe added a comment -

Coming back out of hiding....

I did some reorganisation of files last year based on your comment. Some of the directories have been moved to auth/openid. I left the following where they were:

  • Custom lang file (lang/en_utf8_local). If the module makes it into core then I assume this could be removed and the contents would be moved to the main lang/$lang/auth.php files.
  • Login block (blocks/openid). This isn't required but I didn't want to split it out to a separate module unless you think that's best.
  • 3rd party openid lib (lib/openid). Is this best staying here or moving to auth/openid?

Also, the module now uses the moodle datastore for writing data.

Show
Stuart Metcalfe added a comment - Coming back out of hiding.... I did some reorganisation of files last year based on your comment. Some of the directories have been moved to auth/openid. I left the following where they were:
  • Custom lang file (lang/en_utf8_local). If the module makes it into core then I assume this could be removed and the contents would be moved to the main lang/$lang/auth.php files.
  • Login block (blocks/openid). This isn't required but I didn't want to split it out to a separate module unless you think that's best.
  • 3rd party openid lib (lib/openid). Is this best staying here or moving to auth/openid?
Also, the module now uses the moodle datastore for writing data.
Hide
Hubert Chathi added a comment -

FYI, the JanRain OpenID library, which is the library that Stuart's plugin uses, is now licensed under the Apache License 2.0. The Apache License 2.0 is incompatible with GPL 2.0 (but is compatible with GPL 3.0).

Show
Hubert Chathi added a comment - FYI, the JanRain OpenID library, which is the library that Stuart's plugin uses, is now licensed under the Apache License 2.0. The Apache License 2.0 is incompatible with GPL 2.0 (but is compatible with GPL 3.0).
Hide
Alex S. Brown, PMP IPMA-C added a comment -

I would really like to set up OpenID on my own Moodle environment, so I plan to take a look at this code soon. If anyone else is working on this let me know. I am happy to help and collaborate. If I find a way to fix it, I will submit a patch file.

Show
Alex S. Brown, PMP IPMA-C added a comment - I would really like to set up OpenID on my own Moodle environment, so I plan to take a look at this code soon. If anyone else is working on this let me know. I am happy to help and collaborate. If I find a way to fix it, I will submit a patch file.
Hide
Hubert Chathi added a comment -

AFAIK, if you include all the patches in the LaunchPad bug tracker, it should be functioning fairly well. Some OpenID providers might need a more updated version of the JanRain OpenID library. There's still some work that needs to be done, though.

Show
Hubert Chathi added a comment - AFAIK, if you include all the patches in the LaunchPad bug tracker, it should be functioning fairly well. Some OpenID providers might need a more updated version of the JanRain OpenID library. There's still some work that needs to be done, though.
Hide
Marcus Graham added a comment -

Hi, I have this kind of working on 1.9 here --> http://www.db2university.com/auth/openid/login.php
It has the following decencies:
It does not populate all the fields from most providers (Google for example), but will from myopenid.com.
The url in the confirmation email is not correct the | just before the user name needs to be replaced with a /
The config pages do not save changes to the configuration (I can not turn off confirmation for example).

Obviously not ready for prime time, but if anyone wants this I can make it available.

I plan to get this implemented for Moodle 2.0. Is there any progress in this area from anyone?

Show
Marcus Graham added a comment - Hi, I have this kind of working on 1.9 here --> http://www.db2university.com/auth/openid/login.php It has the following decencies: It does not populate all the fields from most providers (Google for example), but will from myopenid.com. The url in the confirmation email is not correct the | just before the user name needs to be replaced with a / The config pages do not save changes to the configuration (I can not turn off confirmation for example). Obviously not ready for prime time, but if anyone wants this I can make it available. I plan to get this implemented for Moodle 2.0. Is there any progress in this area from anyone?
Hide
Marcus Graham added a comment -

Hi,

We have the openid provider in use at the Moodle 2.0 (RC1) site www.db2university.com. This is an update to the original 1.x provider implemented by Stuart Metcalfe and company.

Limited support for other than openid providers (facebook and Ning) was implemented to meet db2u needs.

The provider is in about 0.50 release state (it's a hack) but has proven reliable in two pilot tests involving more than 500 users.

It is our goal to ultimately make the provider available as a plugin to the Moodle community We would like input on what everyone is looking for.

Thanks.

Show
Marcus Graham added a comment - Hi, We have the openid provider in use at the Moodle 2.0 (RC1) site www.db2university.com. This is an update to the original 1.x provider implemented by Stuart Metcalfe and company. Limited support for other than openid providers (facebook and Ning) was implemented to meet db2u needs. The provider is in about 0.50 release state (it's a hack) but has proven reliable in two pilot tests involving more than 500 users. It is our goal to ultimately make the provider available as a plugin to the Moodle community We would like input on what everyone is looking for. Thanks.
Hide
Andrea Gordon added a comment -

Hi Marcus, could I ask a couple of questions about this..

  • will this allow users to securely sign in to Moodle using their Google Apps user accounts?
  • is the hack available anywhere to download so I can set up a test?

Thanks

Show
Andrea Gordon added a comment - Hi Marcus, could I ask a couple of questions about this..
  • will this allow users to securely sign in to Moodle using their Google Apps user accounts?
  • is the hack available anywhere to download so I can set up a test?
Thanks
Hide
Eloy Lafuente (stronk7) added a comment -

NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.

Show
Eloy Lafuente (stronk7) added a comment - NOTE: This issue was assigned to the STABLE backlog without complete triaging process. Marking it as triaged, but with this note for future reference.
Hide
Nadav Kavalerchik added a comment -

I have recently found this: http://sharedspaces.googlelabs.com/gallery/results list of widgets
that support OpenID authentication and i was wondering if this plugin could also make Moodle an OpenID provider.
By which, it will enable the teachers to embed these widgets inside Moodle courses without the need for the
students (viewing the embedded widgets) to open accounts at these services or at any other OpenID provider.

By making Moodle, an OpenID provider for its users, we can open allot of communication channels with allot of
Web 2 services, out there on the internet.

Show
Nadav Kavalerchik added a comment - I have recently found this: http://sharedspaces.googlelabs.com/gallery/results list of widgets that support OpenID authentication and i was wondering if this plugin could also make Moodle an OpenID provider. By which, it will enable the teachers to embed these widgets inside Moodle courses without the need for the students (viewing the embedded widgets) to open accounts at these services or at any other OpenID provider. By making Moodle, an OpenID provider for its users, we can open allot of communication channels with allot of Web 2 services, out there on the internet.
Hide
Aparup Banerjee added a comment -

i saw this from the openid plugin, .. bump?

Show
Aparup Banerjee added a comment - i saw this from the openid plugin, .. bump?
Hide
Hubert Chathi added a comment -

We (Remote-Learner) have released our version of the OpenID plugin for Moodle 1.9 here: https://github.com/remotelearner/elis.openid . It is based off of Stuart's code, but has many fixes and same new features. Documentation is also available at http://rlcommunity.remote-learner.net/ .

We have worked on porting it to Moodle 2 as well, but it will probably not be ready to be released until October or so.

Andrea: our plugin has been tested with Google Apps accounts.

Nadav: we probably need separate issues for Moodle as an OpenID provider and consumer.

Show
Hubert Chathi added a comment - We (Remote-Learner) have released our version of the OpenID plugin for Moodle 1.9 here: https://github.com/remotelearner/elis.openid . It is based off of Stuart's code, but has many fixes and same new features. Documentation is also available at http://rlcommunity.remote-learner.net/ . We have worked on porting it to Moodle 2 as well, but it will probably not be ready to be released until October or so. Andrea: our plugin has been tested with Google Apps accounts. Nadav: we probably need separate issues for Moodle as an OpenID provider and consumer.
Hide
Nadav Kavalerchik added a comment -

Hubert, I am currently working on Moodle 1.9 to be an OpenID provider. (development was dormant for a while)
I made some progress and i will open a new "contrib" issue when i have something useful to share

Show
Nadav Kavalerchik added a comment - Hubert, I am currently working on Moodle 1.9 to be an OpenID provider. (development was dormant for a while) I made some progress and i will open a new "contrib" issue when i have something useful to share
Hide
Hubert Chathi added a comment -

We (MuchLearning) have an OpenID provider working as a local plugin for Moodle 2.1 (should also work fine in other 2.x versions). I hope that we'll be able to release it soon.

Show
Hubert Chathi added a comment - We (MuchLearning) have an OpenID provider working as a local plugin for Moodle 2.1 (should also work fine in other 2.x versions). I hope that we'll be able to release it soon.
Hide
Nadav Kavalerchik added a comment -

@Hubert

Looking fwd for you Moodle 2.x OpenID Provider

Show
Nadav Kavalerchik added a comment - @Hubert Looking fwd for you Moodle 2.x OpenID Provider
Hide
Hubert Chathi added a comment -

I just added the OpenID provider to the plugins database. Once approved, you can get it at: http://moodle.org/plugins/view.php?plugin=local_openid_idp. Until then, you can get it from my personal git repository: http://vcs.uhoreg.ca/git/?p=moodle-local_openid_idp.git;a=summary

Show
Hubert Chathi added a comment - I just added the OpenID provider to the plugins database. Once approved, you can get it at: http://moodle.org/plugins/view.php?plugin=local_openid_idp. Until then, you can get it from my personal git repository: http://vcs.uhoreg.ca/git/?p=moodle-local_openid_idp.git;a=summary
Hide
Nadav Kavalerchik added a comment -

Hi Hubert

I have installed your OpenID provider plugin. it seems to go without any issues.
But...
I am unable to connect to any major websites that use openid (for user registration)
I keep getting these errors:

Error: Error Code: OPENID_NOSERVERSFOUND
Error Description: Cannot find OpenID Server TAG on Identity page.

It seems there is a need for more code to make it more widely applicable, after reading:
http://stackoverflow.com/questions/6724729/has-any-one-got-class-openid-php-working-with-google-openid

Can you send me a link to a website (service) that support your implementation?

Show
Nadav Kavalerchik added a comment - Hi Hubert I have installed your OpenID provider plugin. it seems to go without any issues. But... I am unable to connect to any major websites that use openid (for user registration) I keep getting these errors:
Error: Error Code: OPENID_NOSERVERSFOUND
Error Description: Cannot find OpenID Server TAG on Identity page.
It seems there is a need for more code to make it more widely applicable, after reading: http://stackoverflow.com/questions/6724729/has-any-one-got-class-openid-php-working-with-google-openid Can you send me a link to a website (service) that support your implementation?
Hide
Hubert Chathi added a comment -

Hi Nadav,

It was tested using the JanRain Python OpenID test client https://github.com/openid/python-openid
I also tested it with an internal site that uses the LightOpenID library.

What are you entering as your identity?

Show
Hubert Chathi added a comment - Hi Nadav, It was tested using the JanRain Python OpenID test client https://github.com/openid/python-openid I also tested it with an internal site that uses the LightOpenID library. What are you entering as your identity?
Hide
Nadav Kavalerchik added a comment -

I tested it with:
mindmeister.com
http://stikis.com/account/login
http://cooltext.com/Login
http://www.commandlinefu.com/users/openid

I am entering my website's url:
http://groworganic.info/moodle

It is, always, asking me to login and i login (always seems to work) and click the "always..." button.
then i am redirected back to the original website... and get the error (above)

Show
Nadav Kavalerchik added a comment - I tested it with: mindmeister.com http://stikis.com/account/login http://cooltext.com/Login http://www.commandlinefu.com/users/openid I am entering my website's url: http://groworganic.info/moodle It is, always, asking me to login and i login (always seems to work) and click the "always..." button. then i am redirected back to the original website... and get the error (above)
Hide
Hubert Chathi added a comment -

Nadav, it looks like I missed a require_once in one file. I've updated my git repository. Can you update and try again? Thanks.

Show
Hubert Chathi added a comment - Nadav, it looks like I missed a require_once in one file. I've updated my git repository. Can you update and try again? Thanks.
Hide
Nadav Kavalerchik added a comment -

No change
Did you try any of the links i referred, above?

Show
Nadav Kavalerchik added a comment - No change Did you try any of the links i referred, above?
Hide
Nadav Kavalerchik added a comment -

btw, this is what i get in the php error log

[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/first" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/first" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
Show
Nadav Kavalerchik added a comment - btw, this is what i get in the php error log
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/first" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/first" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
[06-Dec-2011 19:19:48] Cannot map "http://axschema.org/namePerson/last" because previous mapping exists
Hide
Hubert Chathi added a comment -

No, I hadn't tried the links, because I don't have a publicly accessible Moodle site. I've set up a test site, and I'm waiting for DNS to propagate... In the mean time, I've found another bug, and I've updated my git again. So we can see which one of us is able to test next.

Show
Hubert Chathi added a comment - No, I hadn't tried the links, because I don't have a publicly accessible Moodle site. I've set up a test site, and I'm waiting for DNS to propagate... In the mean time, I've found another bug, and I've updated my git again. So we can see which one of us is able to test next.
Hide
Nadav Kavalerchik added a comment -

Updated from git. Still, no go. I am sure, it's something tiny. I trust you figure it out

Show
Nadav Kavalerchik added a comment - Updated from git. Still, no go. I am sure, it's something tiny. I trust you figure it out
Hide
Hubert Chathi added a comment -

Nadav, can you update and give it another try? It should be working now. And yes, it was something tiny.

Show
Hubert Chathi added a comment - Nadav, can you update and give it another try? It should be working now. And yes, it was something tiny.
Hide
Nadav Kavalerchik added a comment -

It Works!!!

Bless you!

Show
Nadav Kavalerchik added a comment - It Works!!! Bless you!
Hide
Nadav Kavalerchik added a comment -

Hubert,
I am contacting allot of website owners to make sure that their OpenID user registration works with your implementation of OpenID Provider in Moodle. Most of them work fine but some times i get an error which i do not understand if it is originating in their services or from within the Moodle OpenID provider code.

Here is the error message: "The URI you submitted has disallowed characters."

and the service: http://www.wallwisher.com/account/login

and the URI that generated the error:
http://www.wallwisher.com/auth/openidpost/613a313a7b733a383a227265646972656374223b733a383a222f6163636f756e74223b7d?janrain_nonce=2012-01-26T11%3A51%3A59ZcprF2j&openid.assoc_handle=%7BHMAC-SHA1%7D%7B4f209329%7D%7BYdmVfA%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php%3Faction%3Duser%26id%3D19&openid.identity=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php%3Faction%3Duser%26id%3D19&openid.mode=id_res&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.op_endpoint=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php&openid.response_nonce=2012-01-26T11%3A54%3A18ZvzOgD9&openid.return_to=http%3A%2F%2Fwww.wallwisher.com%2Fauth%2Fopenidpost%2F613a313a7b733a383a227265646972656374223b733a383a222f6163636f756e74223b7d%3Fjanrain_nonce%3D2012-01-26T11%253A51%253A59ZcprF2j&openid.sig=2eoevfV%2FP2%2B%2BrfTbJZoo0PhKiHE%3D&openid.signed=assoc_handle%2Cclaimed_id%2Cidentity%2Cmode%2Cns%2Cns.sreg%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned%2Csreg.nickname&openid.sreg.nickname=openid

What do you make of it?

Show
Nadav Kavalerchik added a comment - Hubert, I am contacting allot of website owners to make sure that their OpenID user registration works with your implementation of OpenID Provider in Moodle. Most of them work fine but some times i get an error which i do not understand if it is originating in their services or from within the Moodle OpenID provider code. Here is the error message: "The URI you submitted has disallowed characters." and the service: http://www.wallwisher.com/account/login and the URI that generated the error: http://www.wallwisher.com/auth/openidpost/613a313a7b733a383a227265646972656374223b733a383a222f6163636f756e74223b7d?janrain_nonce=2012-01-26T11%3A51%3A59ZcprF2j&openid.assoc_handle=%7BHMAC-SHA1%7D%7B4f209329%7D%7BYdmVfA%3D%3D%7D&openid.claimed_id=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php%3Faction%3Duser%26id%3D19&openid.identity=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php%3Faction%3Duser%26id%3D19&openid.mode=id_res&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1&openid.op_endpoint=http%3A%2F%2Fgroworganic.info%2Fmoodle%2Flocal%2Fopenid_idp%2Findex.php&openid.response_nonce=2012-01-26T11%3A54%3A18ZvzOgD9&openid.return_to=http%3A%2F%2Fwww.wallwisher.com%2Fauth%2Fopenidpost%2F613a313a7b733a383a227265646972656374223b733a383a222f6163636f756e74223b7d%3Fjanrain_nonce%3D2012-01-26T11%253A51%253A59ZcprF2j&openid.sig=2eoevfV%2FP2%2B%2BrfTbJZoo0PhKiHE%3D&openid.signed=assoc_handle%2Cclaimed_id%2Cidentity%2Cmode%2Cns%2Cns.sreg%2Cop_endpoint%2Cresponse_nonce%2Creturn_to%2Csigned%2Csreg.nickname&openid.sreg.nickname=openid What do you make of it?
Hide
Nadav Kavalerchik added a comment -

I made a video about the OpenID Provider plugin:
http://www.youtube.com/watch?v=PRE8yoJaFw0
Please spread it around

Show
Nadav Kavalerchik added a comment - I made a video about the OpenID Provider plugin: http://www.youtube.com/watch?v=PRE8yoJaFw0 Please spread it around

Dates

  • Created:
    Updated: