forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First implementation of new authentication system, which can now use
pluggable modules in the 'auth' directory. Everything is done through authentication_user_login in lib/moodlelib.php As well as the old default "email" confirmation, I added a new type of confirmation "none", which basically does no confirmation at all.
- Loading branch information
martin
committed
Sep 26, 2002
1 parent
ab998e5
commit faebaf0
Showing
11 changed files
with
164 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
This directory contains authentication modules. | ||
|
||
Each of these modules describes a different way to | ||
check that a user has provided a correct | ||
|
||
- username, and | ||
- password. | ||
|
||
Even when external forms of authentication are being | ||
used, Moodle still maintains the internal "user" table | ||
with all the associated information about that user such | ||
as name, email address and so on. | ||
|
||
The active method is set by the admin on the Configuration page. | ||
|
||
|
||
email - authentication by email (DEFAULT METHOD) | ||
|
||
- user fills out form with email address | ||
- email sent to user with link | ||
- user clicks on link in email to confirm | ||
- user account is created | ||
- user can log in | ||
|
||
|
||
none - no authentication at all .. very insecure!! | ||
|
||
- user logs in using ANY username and password | ||
- if the username doesn't already exist then | ||
a new account is created | ||
- when user tries to access a course they | ||
are forced to set up their account details | ||
|
||
|
||
ldap - Uses an external LDAP server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?PHP // $Id$ | ||
// Standard authentication function | ||
|
||
function auth_user_login ($username, $password) { | ||
// Returns true if the username and password work | ||
// and false if they don't | ||
|
||
global $CFG; | ||
|
||
if (! $user = get_user_info_from_db("username", $username)) { | ||
return false; | ||
} | ||
|
||
return ($user->password == md5($password)); | ||
} | ||
|
||
|
||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?PHP // $Id$ | ||
// No authentication at all. This method approves everything! | ||
|
||
function auth_user_login ($username, $password) { | ||
// Returns true if the username doesn't exist yet | ||
// Returns true if the username and password work | ||
|
||
if (! $user = get_user_info_from_db("username", $username)) { | ||
return true; | ||
} | ||
|
||
return ($user->password == md5($password)); | ||
} | ||
|
||
|
||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters