Moodle  2.2.1
http://www.collinsharper.com
Authentication
Collaboration diagram for Authentication:

Functions

 getUser ()
 setAttributes ($attributes)
 getAttributes ()
 hasAttributes ()
 hasAttribute ($key)
 getAttribute ($key)
 renewAuthentication ()
 forceAuthentication ()
 setCacheTimesForAuthRecheck ($n)
 checkAuthentication ()
 isAuthenticated ()
 isSessionAuthenticated ()
 redirectToCas ($gateway=false, $renew=false)
 logout ($params)
 handleLogoutRequests ($check_client=true, $allowed_clients=false)

Function Documentation

checkAuthentication ( )

This method is called to check whether the user is authenticated or not.

Returns:
TRUE when the user is authenticated, FALSE otherwise.

Definition at line 911 of file client.php.

Here is the call graph for this function:

forceAuthentication ( )

This method is called to be sure that the user is authenticated. When not authenticated, halt by redirecting to the CAS server; otherwise return TRUE.

Returns:
TRUE when the user is authenticated; otherwise halt.

Definition at line 865 of file client.php.

Here is the call graph for this function:

getAttribute ( key)

Definition at line 833 of file client.php.

Here is the call graph for this function:

getAttributes ( )

Definition at line 820 of file client.php.

Here is the caller graph for this function:

getUser ( )

This method returns the CAS user's login name.

Warning:
should be called only after CASClient::forceAuthentication() or CASClient::isAuthenticated(), otherwise halt with an error.
Returns:
the login name of the authenticated user

Definition at line 792 of file client.php.

Here is the caller graph for this function:

handleLogoutRequests ( check_client = true,
allowed_clients = false 
)

This method handles logout requests.

Parameters:
$check_clienttrue to check the client bofore handling the request, false not to perform any access control. True by default.
$allowed_clientsan array of host names allowed to send logout requests. By default, only the CAs server (declared in the constructor) will be allowed.

Definition at line 1194 of file client.php.

Here is the call graph for this function:

hasAttribute ( key)

Definition at line 830 of file client.php.

Here is the caller graph for this function:

hasAttributes ( )

Definition at line 827 of file client.php.

isAuthenticated ( )

This method is called to check if the user is authenticated (previously or by tickets given in the URL).

Returns:
TRUE when the user is authenticated. Also may redirect to the same URL without the ticket.

Definition at line 968 of file client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

isSessionAuthenticated ( )

This method tells if the current session is authenticated.

Returns:
true if authenticated based soley on $_SESSION variable
Since:
0.4.22 by Brendan Arnold

Definition at line 1049 of file client.php.

logout ( params)

This method is used to logout from CAS. $params an array that contains the optional url and service parameters that will be passed to the CAS server

Definition at line 1146 of file client.php.

Here is the call graph for this function:

redirectToCas ( gateway = false,
renew = false 
)

This method is used to redirect the client to the CAS server. It is used by CASClient::forceAuthentication() and CASClient::checkAuthentication().

Parameters:
$gatewaytrue to check authentication, false to force it
$renewtrue to force the authentication with the CAS server

Definition at line 1125 of file client.php.

Here is the call graph for this function:

Here is the caller graph for this function:

renewAuthentication ( )

This method is called to renew the authentication of the user If the user is authenticated, renew the connection If not, redirect to CAS

Definition at line 845 of file client.php.

Here is the call graph for this function:

setAttributes ( attributes)

Definition at line 817 of file client.php.

setCacheTimesForAuthRecheck ( n)

Set the number of times authentication will be cached before rechecked.

Parameters:
$nan integer.

Definition at line 901 of file client.php.

 All Data Structures Namespaces Files Functions Variables Enumerations