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

Functions

 setCacheTimesForAuthRecheck ($n)
 checkAuthentication ()
 forceAuthentication ()
 renewAuthentication ()
 authenticate ()
 isAuthenticated ()
 isSessionAuthenticated ()
 getUser ()
 getAttributes ()
 handleLogoutRequests ($check_client=true, $allowed_clients=false)
 getServerLoginURL ()
 setServerLoginURL ($url= '')
 setServerServiceValidateURL ($url= '')
 setServerProxyValidateURL ($url= '')
 setServerSamlValidateURL ($url= '')
 getServerLogoutURL ()
 setServerLogoutURL ($url= '')
 logout ($params="")
 logoutWithRedirectService ($service)
 logoutWithUrl ($url)
 logoutWithRedirectServiceAndUrl ($service, $url)
 setFixedCallbackURL ($url= '')
 setFixedServiceURL ($url)
 getServiceURL ()
 retrievePT ($target_service, &$err_code, &$err_msg)
 setCasServerCert ($cert)
 setCasServerCACert ($cert)
 setNoCasServerValidation ()

Function Documentation

authenticate ( )

This method has been left from version 0.4.1 for compatibility reasons.

Definition at line 944 of file CAS.php.

checkAuthentication ( )

This method is called to check if the user is authenticated (use the gateway feature).

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

Definition at line 857 of file CAS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

forceAuthentication ( )

This method is called to force authentication if the user was not already authenticated. If the user is not authenticated, halt by redirecting to the CAS server.

Definition at line 885 of file CAS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getAttributes ( )

This method returns the CAS user's login name.

Warning:
should not be called only after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().
Returns:
the login name of the authenticated user

Definition at line 1020 of file CAS.php.

getServerLoginURL ( )

This method returns the URL to be used to login. or phpCAS::isAuthenticated().

Returns:
the login name of the authenticated user

Definition at line 1050 of file CAS.php.

getServerLogoutURL ( )

This method returns the URL to be used to login. or phpCAS::isAuthenticated().

Returns:
the login name of the authenticated user

Definition at line 1146 of file CAS.php.

getServiceURL ( )

Get the URL that is set as the CAS service parameter.

Definition at line 1314 of file CAS.php.

getUser ( )

This method returns the CAS user's login name.

Warning:
should not be called only after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().
Returns:
the login name of the authenticated user

Definition at line 999 of file CAS.php.

Here is the caller graph for this function:

handleLogoutRequests ( check_client = true,
allowed_clients = false 
)

Handle logout requests.

Definition at line 1036 of file CAS.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.

Definition at line 954 of file CAS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

isSessionAuthenticated ( )

Checks whether authenticated based on $_SESSION. Useful to avoid server calls.

Returns:
true if authenticated, false otherwise.
Since:
0.4.22 by Brendan Arnold

Definition at line 984 of file CAS.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 1179 of file CAS.php.

Here is the call graph for this function:

logoutWithRedirectService ( service)

This method is used to logout from CAS. Halts by redirecting to the CAS server.

Parameters:
$servicea URL that will be transmitted to the CAS server

Definition at line 1209 of file CAS.php.

Here is the call graph for this function:

logoutWithRedirectServiceAndUrl ( service,
url 
)

This method is used to logout from CAS. Halts by redirecting to the CAS server.

Parameters:
$servicea URL that will be transmitted to the CAS server
$urla URL that will be transmitted to the CAS server

Definition at line 1250 of file CAS.php.

Here is the call graph for this function:

logoutWithUrl ( url)

This method is used to logout from CAS. Halts by redirecting to the CAS server.

Parameters:
$urla URL that will be transmitted to the CAS server

Definition at line 1229 of file CAS.php.

Here is the call graph for this function:

renewAuthentication ( )

This method is called to renew the authentication.

Definition at line 919 of file CAS.php.

retrievePT ( target_service,
&$  err_code,
&$  err_msg 
)

Retrieve a Proxy Ticket from the CAS server.

Definition at line 1325 of file CAS.php.

setCacheTimesForAuthRecheck ( n)

Set the times authentication will be cached before really accessing the CAS server in gateway mode:

  • -1: check only once, and then never again (until you pree login)
  • 0: always check
  • n: check every "n" time
Parameters:
$nan integer.

Definition at line 842 of file CAS.php.

setCasServerCACert ( cert)

Set the certificate of the CAS server CA.

Parameters:
$certthe CA certificate

Definition at line 1359 of file CAS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setCasServerCert ( cert)

Set the certificate of the CAS server.

Parameters:
$certthe PEM certificate

Definition at line 1341 of file CAS.php.

Here is the call graph for this function:

setFixedCallbackURL ( url = '')

Set the fixed URL that will be used by the CAS server to transmit the PGT. When this method is not called, a phpCAS script uses its own URL for the callback.

Parameters:
$urlthe URL

Definition at line 1276 of file CAS.php.

Here is the call graph for this function:

setFixedServiceURL ( url)

Set the fixed URL that will be set as the CAS service parameter. When this method is not called, a phpCAS script uses its own URL.

Parameters:
$urlthe URL

Definition at line 1298 of file CAS.php.

Here is the call graph for this function:

setNoCasServerValidation ( )

Set no SSL validation for the CAS server.

Definition at line 1375 of file CAS.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setServerLoginURL ( url = '')

Set the login URL of the CAS server.

Parameters:
$urlthe login URL
Since:
0.4.21 by Wyman Chan

Definition at line 1063 of file CAS.php.

Here is the call graph for this function:

setServerLogoutURL ( url = '')

Set the logout URL of the CAS server.

Parameters:
$urlthe logout URL
Since:
0.4.21 by Wyman Chan

Definition at line 1159 of file CAS.php.

Here is the call graph for this function:

setServerProxyValidateURL ( url = '')

Set the proxyValidate URL of the CAS server. Used for all CAS 2.0 validations

Parameters:
$urlthe proxyValidate URL
Since:
1.1.0 by Joachim Fritschi

Definition at line 1105 of file CAS.php.

Here is the call graph for this function:

setServerSamlValidateURL ( url = '')

Set the samlValidate URL of the CAS server.

Parameters:
$urlthe samlValidate URL
Since:
1.1.0 by Joachim Fritschi

Definition at line 1125 of file CAS.php.

Here is the call graph for this function:

setServerServiceValidateURL ( url = '')

Set the serviceValidate URL of the CAS server. Used only in CAS 1.0 validations

Parameters:
$urlthe serviceValidate URL
Since:
1.1.0 by Joachim Fritschi

Definition at line 1084 of file CAS.php.

Here is the call graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations