Connect 3rd party website to moodle authentification

Connect 3rd party website to moodle authentification

by Eric Goller -
Number of replies: 7

Hello fellow devs smile


I hope this is an appropriate place to start with my question as I am absolutely new to moodle and its development culture. A basic forum search and look through the API did not bring up any real answers, so here we go... smile

I am developing a web-service for a research group. Its future users already have accounts in an existing moodle instance. I wonder if there is an existing infrastructure/API to use moodles authentification for signing into my new service. This is opposite to what some forum threats discussed: making moodle query a 3rd party authentication infrastructure. I noticed that mahara seems able to do something like this with the help of the mood auth hub, but the docs give the impression that this a specific usecase and not a generic interface external sites can hook into.


Thanks for any pointers you can provide feel free to comment if more information is required.

Average of ratings: Useful (1)
In reply to Eric Goller

Re: Connect 3rd party website to moodle authentification

by Eric Goller -
Did my post violate any forum guidelines or is out of line in any other regard? The obvious reason for this question is my surprise over the lack of feedback on this. I would have thought that there may be at leasts some very basic comments. Please let me know if I can improve my question or should ask somewhere else.
In reply to Eric Goller

Re: Connect 3rd party website to moodle authentification

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Always assume apathy before conspiracy smile., no guidelines were broached in the formation of your post, I particularly liked the way you didn't use the word Urgent (always a winner)....

But seriously would LTI be of help. If not say so and I will put my thinking hat on again....


update: Moodle/Mahara uses a thing called MNET

Average of ratings: Useful (1)
In reply to Marcus Green

Re: Connect 3rd party website to moodle authentification

by Iñaki Arenaza -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Hi Eric,

maybe this OAuth2 server plugin (https://github.com/projectestac/moodle-local_oauth) fits your needs.

Note about Moodle/Mahara and MNET: it's being deprecated (thought it's taking a loooong time, so it might still be around for some time), so I wouldn't rely on it.

Saludos.

Iñaki.

Average of ratings: Useful (2)
In reply to Iñaki Arenaza

Re: Connect 3rd party website to moodle authentification

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

The history of MNET is odd. I could swear I saw Martin D take it out the back with an axe in one hand and a glint in his eye but it still exists. I had to support it for a few years and when it was working it was fine, but it did seem a bit delicate. I recommend you follow the advice of Iñaki Arenaza

In reply to Iñaki Arenaza

Re: Connect 3rd party website to moodle authentification

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

The history of MNET is odd. I could swear I saw Martin D take it out the back with an axe in one hand and a glint in his eye but it still exists. I had to support it for a few years and when it was working it was fine, but it did seem a bit delicate. I recommend you follow the advice of Iñaki Arenaza

In reply to Eric Goller

Re: Connect 3rd party website to moodle authentification

by Eric Goller -

I just wanted to thank all of you for your time coming sharing your pointers. Thanks to that I do now have something to research as well as to discuss with the admins of the existing infrastructure.

I will get back to you here once a solutionss emerges. Until then, thanks again for your work on moodle in general and your help in this thread in particular.

In reply to Eric Goller

Re: Connect 3rd party website to moodle authentification

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Eric,

If you can do some PHP development, take a look at [UNI Login](https://moodle.org/plugins/auth_unilogin). As it is, it is totally useless to you however the source code is not overly complicated by lots of options. After spending a little time reading through it, you might realize that it can be converted into exactly what you need as I did. I've cloned and customized it in the past to create single sign-on for a client with great results.

If your application and your Moodle site can share access to the same database server, External Database Authentication (Site administration > Plugins > Authentication > External database) might be what you need.

Best regards,

Michael

Average of ratings: Useful (2)