New authentication methods - IMAP, POP3, NNTP, database

New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Number of replies: 19
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Last night I added a bunch of new authentication methods. You can now authenticate against IMAP servers (including SSL and certificate-based), POP3 servers, NNTP servers, and also against arbitrary fields in arbitrary external database tables.

The code is very new and completely untested (I haven't got time) so I'd appreciate anyone out there with time and inclination who could test it out against their own IMAP servers etc. You just need to download the latest CVS code or nightly archive, and for now, you will need to manually edit parameters in auth/*/lib.php (a GUI is coming).

Please be very cautious using these new authentication methods in production environments.

Cheers,
Martin
Average of ratings: -
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by Sean Keogh -
I'll grab the nightly, try it with our IMAP server and report back.

Thanks Martin

rgds

Sean K
In reply to Sean Keogh

Re: New authentication methods - IMAP, POP3, NNTP, database

by Sean Keogh -
.....and further on to that, and our email chats, *and* the installation of 1.0.6.4 today (which went fine) I can report that it all seems to be working very well indeed, both on IMAP (To courier) authentication and on external db (using MySQL).

Thanks hugely, Martin. It's a great system....and I'm sure we'll be using it a lot.

Another thought on a potential new feature. Would it be possible to put in a "Copy Course" function? The idea being that if you want to create a new version of an existing course, then you can make a new course based on the old one (but with a new name obviously). Then you go in and tweak it to your heart's content while the old one keeps on going, until you are ready to put the new one up.
If you are making a new course that is very similar to an existing one then it would save a bit of time and duplicated effort. Just a thought.

*By the way!* You should have a small parcel arriving in the post fairly soon... smile


rgds


Sean M Keogh, Oxford (and Swindon), UK
In reply to Sean Keogh

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Thanks, Sean, glad to hear the good news.

This upcoming feature may help do what you want: http://bugs.moodle.org/bug.php?op=show&bugid=84

Cheers,
Martin
In reply to Martin Dougiamas

Re: New course backup/restore feature

by Sean Keogh -
Ahh yes, looks useful. So I could back up a course...restore it with a different name, then empty it of student input, ready for tweaking. That would do the trick indeed.


rgds


Sean K
In reply to Sean Keogh

Re: New authentication methods - IMAP, POP3, NNTP, database

by Barry Bell -

I like the idea of a copy feature this would save time, also a poll feature would be nice, even though I have made my own, just takes a little work.

 

www.chess4us.dynu.com

 

Thanks

 

In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

Hi Martin and others in this forum :

I  encounter one problem on using external authentication using  POP3 .

When I set up a e-mail server IP , and  try to login into moodle , I got a "blank page".

(of course , I typed in a valid ID/Pwd)

I don't know what happened , because there is no error message , it's just a "blank page " .

And the URL of the page is "moodle/login/index.php".

Is there any one out there have this problem ?

I did setup the IP/POP3/Port number/instruction.

Anything I did wrong ?

Anyone can give me a hand on this strang problem ?

 

Thanks and Regards

 

Liang

In reply to koohsu liang

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
When I set up POP3 the login page works for me ... I don't know why you could be getting that.

Blank pages are usually the symptom of a "require" file having an error.

Anyone else got an idea? (If you find the answer, Liang, post back here)
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

Hi Martin :

Thanks for your reply .

I try to put 3 different error("string#"); on 3 places(not in the same time ) in order to trace where it has been through.

And I found the string shows it's been through "case pop3" (it show the string1 on the top with "continue" bellow it and plus footer--in a standard theme layout  ).

What else I can attempt to do ?

 

Thanks and Regards

In reply to koohsu liang

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Are you using 1.0.7?

Keep doing what you're doing and try and find the exact file and line where the problem is. Post a screenshot if you think it might be helpful.
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

only before this line :$connection = imap_open($host, $username, $password, OP_HALFOPEN);

will show those screenshot as attachment.

P.S.:

1.I am using the "night version " download today.

 2. The environment I try include sad1) win2000 pro with IIS -night version(2) win2000 pro with FoxServer-1.0.6

 using two different computer, the first one use "localhost" , another one use an internal IP , do u think that will cause any problem ?

Attachment moodle_error2.jpg
In reply to koohsu liang

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What are the settings you entered for POP3?
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

I just type in the IP of the mail server , for example :212.1.1.5

 

In reply to koohsu liang

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
What about the port and the pop3 type?
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

linux pop server , port 25 , 110 for smtp and pop . (And I type ip and port 110 in moodle for sure)

we block the imap port for security  reason, do u think it will be the reason ? 

In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

Hi Martin :

Does the nightly version support authentication in using "MSSQL" ?

I try all the tree way (adomssql,mssql,odbcsql) , and all result in fail.

Is anyone out there did this before ?

 

Thanks and Regards

 

In reply to koohsu liang

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Yes, it should work, but it hasn't been tested on those databases yet as far as I know.

The SQL command is very simple but I hear MSSQL has "issues" with normal SQL.
In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by koohsu liang -

I just got the error message : can't connect to the specific database.

I'll look at the code later to find out more about the "Pconnect () " and "connect" things.

I'll let you know if I find anything.

In reply to Martin Dougiamas

Re: New authentication methods - IMAP, POP3, NNTP, database

by Daniel Moree -
I'm running Moodle 1.6.3+ on Apache 2.x PHP 5.x and Mysql 5.x. This is a Fedora Core 5 machine. The problem I'm having is when using the standard E-Mail based authentication, it works fine. If I try to authenticate against IMAP, POP3, or Active Directory, I don't get logged in. I have tried it with a bad password and get the same thing. Just a blank screen with no source code. So for those who are counting, I've tried 3 types of authentication, all with good usernames and passwords and bad usernames and passwords and get the same Blank screen. The URL is: moodle/login/index.php

Now for the weird part!

This exact same setup is running on this computer, except, its a Windows XP Pro machine! So the same servers are running and it's setup with the same configuration settings. Mirror box except its in Windows. This Windows box works fine. Authenticates using any method I want and all. So where is the difference? Hope you guys can help!
In reply to Daniel Moree

Re: New authentication methods - IMAP, POP3, NNTP, database

by Martín Langhoff -
Daniel -- post with more info in the user authentication forum. It probably means that the FC5 install doesn't have the right PHP extensions installed.