mirror of
https://github.com/moodle/moodle.git
synced 2025-04-24 18:04:43 +02:00
Moved info into README
This commit is contained in:
parent
dae2aa54a3
commit
5b06bef18c
106
auth/README
106
auth/README
@ -82,3 +82,109 @@ db - Uses an external database to check username/password
|
||||
- if correct, user is logged in
|
||||
- if the username doesn't already exist then
|
||||
a new Moodle account is created
|
||||
|
||||
|
||||
------------------------------------------------------------------------------------
|
||||
|
||||
Authentication API
|
||||
|
||||
This file describes Moodle interface functions to authentication modules.
|
||||
|
||||
Most of functions are from ldap-authentication module and are not implemented (yet?)
|
||||
on other modules. Please feel free to extend other modules to support same features
|
||||
or roll your own module.
|
||||
|
||||
Some of new function are still tested and are not documented here yet.
|
||||
|
||||
|
||||
|
||||
AUTHENTICATION
|
||||
Basic fuctions to authenticate users with external db
|
||||
|
||||
Mandatory:
|
||||
|
||||
auth_user_login ($username, $password)
|
||||
|
||||
Authenticate username, password with userdatabase.
|
||||
|
||||
Returns:
|
||||
true if the username and password work
|
||||
and false if they don't
|
||||
|
||||
Optional:
|
||||
|
||||
auth_get_userinfo($username)
|
||||
|
||||
Query other userinformation from database.
|
||||
|
||||
Returns:
|
||||
Userinformation in array ( name => value, ....
|
||||
or false in case of error
|
||||
|
||||
COURSE CREATING
|
||||
|
||||
auth_iscreator($username)
|
||||
|
||||
should user have rights to create courses
|
||||
|
||||
Returns:
|
||||
True if user have rights to crete cources otherwise false
|
||||
|
||||
|
||||
USER CREATION
|
||||
|
||||
Functions that enable usercreation, activation and deactivation
|
||||
from moodle to external database
|
||||
|
||||
|
||||
auth_user_exists ($username)
|
||||
|
||||
Checks if given username exist on external db
|
||||
|
||||
Returns:
|
||||
true if given usernname exist or false
|
||||
|
||||
auth_user_create ($userobject,$plainpass)
|
||||
|
||||
Creates new user to external db. User should be created
|
||||
in inactive stage until confirmed by email.
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
auth_user_activate ($username)
|
||||
|
||||
activate new user after email-address is confirmed
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
auth_user_disable ($username) {
|
||||
|
||||
deactivate user in external db.
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
|
||||
USER INFORMATION AND SYNCRONIZATION
|
||||
|
||||
auth_get_userlist ()
|
||||
|
||||
Get list of usernames in external db.
|
||||
|
||||
Returns:
|
||||
All usernames in array or false on error.
|
||||
|
||||
|
||||
auth_get_users($filter='*')
|
||||
|
||||
Get ALL USEROBJECTS FROM EXTERNAL DB.
|
||||
|
||||
Returns:
|
||||
Array of all users as objects from external db
|
||||
|
||||
|
||||
|
@ -1,109 +0,0 @@
|
||||
|
||||
|
||||
Moodles authentication interface
|
||||
|
||||
This file describes moodles interfacefunctions to authentication modules.
|
||||
|
||||
Most of functions are from ldap-authentication module and are not implemented (yet?)
|
||||
on other modules. Please feel free to extend other modules to support same features
|
||||
or roll your own module.
|
||||
|
||||
Some of new function are still tested and are not documented here yet.
|
||||
|
||||
|
||||
|
||||
AUTHENTICATION
|
||||
Basic fuctions to authenticate users with external db
|
||||
|
||||
Mandatory:
|
||||
|
||||
auth_user_login ($username, $password)
|
||||
|
||||
Authenticate username, password with userdatabase.
|
||||
|
||||
Returns:
|
||||
true if the username and password work
|
||||
and false if they don't
|
||||
|
||||
Optional:
|
||||
|
||||
auth_get_userinfo($username)
|
||||
|
||||
Query other userinformation from database.
|
||||
|
||||
Returns:
|
||||
Userinformation in array ( name => value, ....
|
||||
or false in case of error
|
||||
|
||||
COURSE CREATING
|
||||
|
||||
auth_iscreator($username)
|
||||
|
||||
should user have rights to create courses
|
||||
|
||||
Returns:
|
||||
True if user have rights to crete cources otherwise false
|
||||
|
||||
|
||||
USER CREATION
|
||||
|
||||
Functions that enable usercreation, activation and deactivation
|
||||
from moodle to external database
|
||||
|
||||
|
||||
auth_user_exists ($username)
|
||||
|
||||
Checks if given username exist on external db
|
||||
|
||||
Returns:
|
||||
true if given usernname exist or false
|
||||
|
||||
auth_user_create ($userobject,$plainpass)
|
||||
|
||||
Creates new user to external db. User should be created
|
||||
in inactive stage until confirmed by email.
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
auth_user_activate ($username)
|
||||
|
||||
activate new user after email-address is confirmed
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
auth_user_disable ($username) {
|
||||
|
||||
deactivate user in external db.
|
||||
|
||||
Returns:
|
||||
True on success otherwise false
|
||||
|
||||
|
||||
|
||||
USER INFORMATION AND SYNCRONIZATION
|
||||
|
||||
auth_get_userlist ()
|
||||
|
||||
Get list of usernames in external db.
|
||||
|
||||
Returns:
|
||||
All usernames in array or false on error.
|
||||
|
||||
|
||||
auth_get_users($filter='*')
|
||||
|
||||
Get ALL USEROBJECTS FROM EXTERNAL DB.
|
||||
|
||||
Returns:
|
||||
Array of all users as objects from external db
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user