| [ Index ] |
PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008] |
[Source view] [Print] [Project Stats]
(no description)
| Author: | Martin Dougiamas |
| License: | http://www.gnu.org/copyleft/gpl.html GNU Public License |
| File Size: | 1357 lines (53 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 1 file auth/mnet/config.html |
auth_plugin_mnet:: (27 methods):
auth_plugin_mnet()
mnet_publishes()
user_login()
user_authorise()
generate_token()
start_jump_session()
confirm_mnet_session()
update_enrolments()
is_internal()
can_change_password()
change_password_url()
config_form()
process_config()
keepalive_client()
refresh_log()
keepalive_server()
cron()
prelogout_hook()
kill_parent()
kill_children()
kill_child()
end_local_sessions()
fetch_user_image()
fetch_theme_info()
has_service()
can_login_remotely()
logoutpage_hook()
Class: auth_plugin_mnet - X-Ref
Moodle Network authentication plugin.| auth_plugin_mnet() X-Ref |
| Constructor. |
| mnet_publishes() X-Ref |
| Provides the allowed RPC services from this class as an array. return: array Allowed RPC services. |
| user_login($username, $password) X-Ref |
| 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. param: string $username The username param: string $password The password return: bool Authentication success or failure. |
| user_authorise($token, $useragent) X-Ref |
| Return user data for the provided token, compare with user_agent string. param: string $token The unique ID provided by remotehost. param: string $UA User Agent string. return: array $userdata Array of user info for remote host |
| generate_token() X-Ref |
| Generate a random string for use as an RPC session token. |
| start_jump_session($mnethostid, $wantsurl) X-Ref |
| Starts an RPC jump session and returns the jump redirect URL. |
| confirm_mnet_session($token, $remotewwwroot) X-Ref |
| 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. param: string $token The random session token. param: string $remotewwwroot The ID provider wwwroot. return: array The local user record. |
| update_enrolments($username, $courses) X-Ref |
| 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 param: string $username The username param: string $courses Assoc array of courses following the structure of mnet_enrol_course return: bool |
| is_internal() X-Ref |
| Returns true if this authentication plugin is 'internal'. return: bool |
| can_change_password() X-Ref |
| Returns true if this authentication plugin can change the user's password. return: bool |
| change_password_url() X-Ref |
| Returns the URL for changing the user's pw, or false if the default can be used. return: string |
| config_form($config, $err, $user_fields) X-Ref |
| 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. param: array $page An object containing all the data for this page. |
| process_config($config) X-Ref |
| Processes and stores configuration data for this authentication plugin. |
| keepalive_client() X-Ref |
| Poll the IdP server to let it know that a user it has authenticated is still online return: void |
| refresh_log($array) X-Ref |
| Receives an array of log entries from an SP and adds them to the mnet_log table param: array $array An array of usernames return: string "All ok" or an error message |
| keepalive_server($array) X-Ref |
| Receives an array of usernames from a remote machine and prods their sessions to keep them alive param: array $array An array of usernames return: string "All ok" or an error message |
| cron() X-Ref |
| Cron function will be called automatically by cron.php every 5 minutes return: void |
| prelogout_hook() X-Ref |
| Cleanup any remote mnet_sessions, kill the local mnet_session data This is called by require_logout in moodlelib return: void |
| kill_parent($username, $useragent) X-Ref |
| The SP uses this function to kill the session on the parent IdP param: string $username Username for session to kill param: string $useragent SHA1 hash of user agent to look for return: string A plaintext report of what has happened |
| kill_children($username, $useragent) X-Ref |
| The IdP uses this function to kill child sessions on other hosts param: string $username Username for session to kill param: string $useragent SHA1 hash of user agent to look for return: string A plaintext report of what has happened |
| kill_child($username, $useragent) X-Ref |
| TODO:Untested 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. param: string $username Username for session to kill param: string $useragent SHA1 hash of user agent to look for return: bool True on success |
| end_local_sessions(&$sessionArray) X-Ref |
| To delete a host, we must delete all current sessions that users from that host are currently engaged in. param: string $sessionidarray An array of session hashes return: bool True on success |
| fetch_user_image($username) X-Ref |
| Returns the user's image as a base64 encoded string. param: int $userid The id of the user return: string The encoded image |
| fetch_theme_info() X-Ref |
| Returns the theme information and logo url as strings. return: string The theme info |
| has_service($mnethostid, $servicename) X-Ref |
| Determines if an MNET host is providing the nominated service. param: int $mnethostid The id of the remote host param: string $servicename The name of the service return: bool Whether the service is available on the remote host |
| can_login_remotely($username, $mnethostid) X-Ref |
| Checks the MNET access control table to see if the username/mnethost is permitted to login to this moodle. param: string $username The username param: int $mnethostid The id of the remote mnethost return: bool Whether the user can login from the remote host |
| logoutpage_hook() X-Ref |
| No description |
| Generated: Wed Jan 14 11:33:29 2009 | Cross-referenced by PHPXref 0.7 |