[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/auth/cas/ -> auth.php (summary)

Authentication Plugin: CAS Authentication Authentication using CAS (Central Authentication Server).

Author: Martin Dougiamas
Author: Jerome GUTIERREZ
Author: IƱaki Arenaza
License: http://www.gnu.org/copyleft/gpl.html GNU Public License
File Size: 542 lines (20 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

auth_plugin_cas:: (17 methods):
  __construct()
  auth_plugin_cas()
  prevent_local_passwords()
  user_login()
  is_internal()
  can_change_password()
  loginpage_hook()
  connectCAS()
  config_form()
  validate_form()
  change_password_url()
  process_config()
  iscreator()
  get_userinfo()
  sync_users()
  logoutpage_hook()
  postlogout_hook()


Class: auth_plugin_cas  - X-Ref

CAS authentication plugin.

__construct()   X-Ref
Constructor.


auth_plugin_cas()   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


prevent_local_passwords()   X-Ref
No description

user_login($username, $password)   X-Ref
Authenticates user against CAS
Returns true if the username and password work and false if they are
wrong or don't exist.

param: string $username The username (with system magic quotes)
param: string $password The password (with system magic quotes)
return: bool Authentication success or failure.

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

loginpage_hook()   X-Ref
Authentication choice (CAS or other)
Redirection to the CAS form or to login/index.php
for other authentication


connectCAS()   X-Ref
Connect to the CAS (clientcas connection or proxycas connection)


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.

validate_form($form, &$err)   X-Ref
A chance to validate form data, and last chance to
do stuff before it is inserted in config_plugin

param: object object with submitted configuration settings (without system magic quotes)
param: array $err array of error messages

change_password_url()   X-Ref
Returns the URL for changing the user's pw, or empty if the default can
be used.

return: moodle_url

process_config($config)   X-Ref
Processes and stores configuration data for this authentication plugin.


iscreator($username)   X-Ref
Returns true if user should be coursecreator.

param: mixed $username    username (without system magic quotes)
return: boolean result

get_userinfo($username)   X-Ref
Reads user information from LDAP and returns it as array()

If no LDAP servers are configured, user information has to be
provided via other methods (CSV file, manually, etc.). Return
an empty array so existing user info is not lost. Otherwise,
calls parent class method to get user info.

param: string $username username
return: mixed array with no magic quotes or false on error

sync_users($do_updates=true)   X-Ref
Syncronizes users from LDAP server to moodle user table.

If no LDAP servers are configured, simply return. Otherwise,
call parent class method to do the work.

param: bool $do_updates will do pull in data updates from LDAP if relevant
return: nothing

logoutpage_hook()   X-Ref
Hook for logout page


postlogout_hook($user)   X-Ref
Post logout hook.

Note: this method replace the prelogout_hook method to avoid redirect to CAS logout
before the event userlogout being triggered.

param: stdClass $user clone of USER object object before the user session was terminated



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1