|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| auth_plugin_mnet () | |
| user_login ($username, $password) | |
| user_authorise ($token, $useragent) | |
| generate_token () | |
| start_jump_session ($mnethostid, $wantsurl, $wantsurlbackhere=false) | |
| confirm_mnet_session ($token, $remotepeer) | |
| update_mnet_session ($user, $token, $remotepeer) | |
| update_enrolments ($username, $courses) | |
| prevent_local_passwords () | |
| is_internal () | |
| can_change_password () | |
| change_password_url () | |
| config_form ($config, $err, $user_fields) | |
| process_config ($config) | |
| keepalive_client () | |
| refresh_log ($array) | |
| keepalive_server ($array) | |
| cron () | |
| prelogout_hook () | |
| kill_parent ($username, $useragent) | |
| kill_children ($username, $useragent) | |
| kill_child ($username, $useragent) | |
| end_local_sessions (&$sessionArray) | |
| fetch_user_image ($username) | |
| fetch_theme_info () | |
| has_service ($mnethostid, $servicename) | |
| can_login_remotely ($username, $mnethostid) | |
| logoutpage_hook () | |
| trim_logline ($logline) | |
| loginpage_idp_list ($wantsurl) | |
| auth_plugin_mnet | ( | ) |
Returns true if this authentication plugin can change the user's password.
Reimplemented from auth_plugin_base.
| can_login_remotely | ( | $ | username, |
| $ | mnethostid | ||
| ) |
Checks the MNET access control table to see if the username/mnethost is permitted to login to this moodle.
| string | $username | The username |
| int | $mnethostid | The id of the remote mnethost |
Definition at line 1217 of file auth.php.

Returns the URL for changing the user's pw, or false if the default can be used.
Reimplemented from auth_plugin_base.
| config_form | ( | $ | config, |
| $ | err, | ||
| $ | user_fields | ||
| ) |
Prints a form for configuring this authentication plugin.
This function is called from admin/auth.php, and outputs a full page with a form for configuring this plugin.
| object | $config | |
| object | $err | |
| array | $user_fields |
Reimplemented from auth_plugin_base.
| confirm_mnet_session | ( | $ | token, |
| $ | remotepeer | ||
| ) |
This function confirms the remote (ID provider) host's mnet session by communicating the token and UA over the XMLRPC transport layer, and returns the local user record on success.
| string | $token | The random session token. |
| mnet_peer | $remotepeer | The ID provider mnet_peer object. |
Definition at line 206 of file auth.php.

| cron | ( | ) |
| end_local_sessions | ( | &$ | sessionArray | ) |
| fetch_theme_info | ( | ) |
| fetch_user_image | ( | $ | username | ) |
Returns the user's profile image info
If the user exists and has a profile picture, the returned array will contain keys: f1 - the content of the default 100x100px image f1_mimetype - the mimetype of the f1 file f2 - the content of the 35x35px variant of the image f2_mimetype - the mimetype of the f2 file
The mimetype information was added in Moodle 2.0. In Moodle 1.x, images are always jpegs.
| int | $userid | The id of the user |
Definition at line 1134 of file auth.php.

| generate_token | ( | ) |
| has_service | ( | $ | mnethostid, |
| $ | servicename | ||
| ) |
Determines if an MNET host is providing the nominated service.
| int | $mnethostid | The id of the remote host |
| string | $servicename | The name of the service |
Definition at line 1183 of file auth.php.

| is_internal | ( | ) |
Returns true if this authentication plugin is 'internal'.
Reimplemented from auth_plugin_base.
| keepalive_client | ( | ) |
| keepalive_server | ( | $ | array | ) |
| kill_child | ( | $ | username, |
| $ | useragent | ||
| ) |
When the IdP requests that child sessions are terminated, this function will be called on each of the child hosts. The machine that calls the function (over xmlrpc) provides us with the mnethostid we need.
| string | $username | Username for session to kill |
| string | $useragent | SHA1 hash of user agent to look for |
Definition at line 1088 of file auth.php.

| kill_children | ( | $ | username, |
| $ | useragent | ||
| ) |
The IdP uses this function to kill child sessions on other hosts
| string | $username | Username for session to kill |
| string | $useragent | SHA1 hash of user agent to look for |
Definition at line 1027 of file auth.php.

| kill_parent | ( | $ | username, |
| $ | useragent | ||
| ) |
The SP uses this function to kill the session on the parent IdP
| string | $username | Username for session to kill |
| string | $useragent | SHA1 hash of user agent to look for |
Definition at line 980 of file auth.php.

| loginpage_idp_list | ( | $ | wantsurl | ) |
Returns a list of potential IdPs that this authentication plugin supports. This is used to provide links on the login page.
| string | $wantsurl | the relative url fragment the user wants to get to. You can use this to compose a returnurl, for example |
Reimplemented from auth_plugin_base.
| logoutpage_hook | ( | ) |
Hook for overriding behaviour of logout page. This method is called from login/logout.php page for all enabled auth plugins.
object string
Reimplemented from auth_plugin_base.
| prelogout_hook | ( | ) |
Cleanup any remote mnet_sessions, kill the local mnet_session data
This is called by require_logout in moodlelib
Reimplemented from auth_plugin_base.
Definition at line 955 of file auth.php.

Indicates if password hashes should be stored in local moodle database.
Reimplemented from auth_plugin_base.
| process_config | ( | $ | config | ) |
Processes and stores configuration data for this authentication plugin.
Reimplemented from auth_plugin_base.
Definition at line 672 of file auth.php.

| refresh_log | ( | $ | array | ) |
| start_jump_session | ( | $ | mnethostid, |
| $ | wantsurl, | ||
| $ | wantsurlbackhere = false |
||
| ) |
Starts an RPC jump session and returns the jump redirect URL.
| int | $mnethostid | id of the mnet host to jump to |
| string | $wantsurl | url to redirect to after the jump (usually on remote system) |
| boolean | $wantsurlbackhere | defaults to false, means that the remote system should bounce us back here rather than somewhere inside *its* wwwroot |
Definition at line 131 of file auth.php.

| trim_logline | ( | $ | logline | ) |
| update_enrolments | ( | $ | username, |
| $ | courses | ||
| ) |
Invoke this function _on_ the IDP to update it with enrolment info local to the SP right after calling user_authorise()
Normally called by the SP after calling user_authorise()
| string | $username | The username |
| array | $courses | Assoc array of courses following the structure of mnetservice_enrol_courses |
Definition at line 463 of file auth.php.

| update_mnet_session | ( | $ | user, |
| $ | token, | ||
| $ | remotepeer | ||
| ) |
creates (or updates) the mnet session once {
| user_authorise | ( | $ | token, |
| $ | useragent | ||
| ) |
Return user data for the provided token, compare with user_agent string.
| string | $token | The unique ID provided by remotehost. |
| string | $UA | User Agent string. |
Definition at line 55 of file auth.php.

| user_login | ( | $ | username, |
| $ | password | ||
| ) |
This function is normally used to determine if the username and password are correct for local logins. Always returns false, as local users do not need to login over mnet xmlrpc.
| string | $username | The username |
| string | $password | The password |
Reimplemented from auth_plugin_base.