ILIAS  release_5-2 Revision v5.2.25-18-g3f80b82851
Authentication
+ Collaboration diagram for Authentication:

Functions

static phpCAS::setCacheTimesForAuthRecheck ($n)
 Set the times authentication will be cached before really accessing the CAS server in gateway mode: More...
 
static phpCAS::setCasAttributeParserCallback ($function, array $additionalArgs=array())
 Set a callback function to be run when receiving CAS attributes. More...
 
static phpCAS::setPostAuthenticateCallback ($function, array $additionalArgs=array())
 Set a callback function to be run when a user authenticates. More...
 
static phpCAS::setSingleSignoutCallback ($function, array $additionalArgs=array())
 Set a callback function to be run when a single-signout request is received. More...
 
static phpCAS::checkAuthentication ()
 This method is called to check if the user is already authenticated locally or has a global cas session. More...
 
static phpCAS::forceAuthentication ()
 This method is called to force authentication if the user was not already authenticated. More...
 
static phpCAS::renewAuthentication ()
 This method is called to renew the authentication. More...
 
static phpCAS::isAuthenticated ()
 This method is called to check if the user is authenticated (previously or by tickets given in the URL). More...
 
static phpCAS::isSessionAuthenticated ()
 Checks whether authenticated based on $_SESSION. More...
 
static phpCAS::getUser ()
 This method returns the CAS user's login name. More...
 
static phpCAS::getAttributes ()
 Answer attributes about the authenticated user. More...
 
static phpCAS::hasAttributes ()
 Answer true if there are attributes for the authenticated user. More...
 
static phpCAS::hasAttribute ($key)
 Answer true if an attribute exists for the authenticated user. More...
 
static phpCAS::getAttribute ($key)
 Answer an attribute for the authenticated user. More...
 
static phpCAS::handleLogoutRequests ($check_client=true, $allowed_clients=false)
 Handle logout requests. More...
 
static phpCAS::getServerLoginURL ()
 This method returns the URL to be used to login. More...
 
static phpCAS::setServerLoginURL ($url='')
 Set the login URL of the CAS server. More...
 
static phpCAS::setServerServiceValidateURL ($url='')
 Set the serviceValidate URL of the CAS server. More...
 
static phpCAS::setServerProxyValidateURL ($url='')
 Set the proxyValidate URL of the CAS server. More...
 
static phpCAS::setServerSamlValidateURL ($url='')
 Set the samlValidate URL of the CAS server. More...
 
static phpCAS::getServerLogoutURL ()
 This method returns the URL to be used to login. More...
 
static phpCAS::setServerLogoutURL ($url='')
 Set the logout URL of the CAS server. More...
 
static phpCAS::logout ($params="")
 This method is used to logout from CAS. More...
 
static phpCAS::logoutWithRedirectService ($service)
 This method is used to logout from CAS. More...
 
static phpCAS::logoutWithUrl ($url)
 This method is used to logout from CAS. More...
 
static phpCAS::logoutWithRedirectServiceAndUrl ($service, $url)
 This method is used to logout from CAS. More...
 
static phpCAS::setFixedCallbackURL ($url='')
 Set the fixed URL that will be used by the CAS server to transmit the PGT. More...
 
static phpCAS::setFixedServiceURL ($url)
 Set the fixed URL that will be set as the CAS service parameter. More...
 
static phpCAS::getServiceURL ()
 Get the URL that is set as the CAS service parameter. More...
 
static phpCAS::retrievePT ($target_service, & $err_code, & $err_msg)
 Retrieve a Proxy Ticket from the CAS server. More...
 
static phpCAS::setCasServerCACert ($cert, $validate_cn=true)
 Set the certificate of the CAS server CA and if the CN should be properly verified. More...
 
static phpCAS::setNoCasServerValidation ()
 Set no SSL validation for the CAS server. More...
 
static phpCAS::setNoClearTicketsFromUrl ()
 Disable the removal of a CAS-Ticket from the URL when authenticating DISABLING POSES A SECURITY RISK: We normally remove the ticket by an additional redirect as a security precaution to prevent a ticket in the HTTP_REFERRER or be carried over in the URL parameter. More...
 

Detailed Description

Function Documentation

◆ checkAuthentication()

static phpCAS::checkAuthentication ( )
static

This method is called to check if the user is already authenticated locally or has a global cas session.

A already existing cas session is determined by a cas gateway call.(cas login call without any interactive prompt)

Returns
true when the user is authenticated, false when a previous gateway login failed or the function will not return if the user is redirected to the cas server for a gateway login attempt

Definition at line 1073 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by ilSoapAuthenticationCAS\authenticate().

1074  {
1077 
1078  $auth = self::$_PHPCAS_CLIENT->checkAuthentication();
1079 
1080  // store where the authentication has been checked and the result
1081  self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
1082 
1083  phpCAS :: traceEnd($auth);
1084  return $auth;
1085  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ forceAuthentication()

static phpCAS::forceAuthentication ( )
static

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.

Returns
bool Authentication

Definition at line 1094 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by ilAuthProviderCAS\doAuthentication(), and ilCASAuth\forceCASAuth().

1095  {
1098  $auth = self::$_PHPCAS_CLIENT->forceAuthentication();
1099 
1100  // store where the authentication has been checked and the result
1101  self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
1102 
1103  /* if (!$auth) {
1104  phpCAS :: trace('user is not authenticated, redirecting to the CAS server');
1105  self::$_PHPCAS_CLIENT->forceAuthentication();
1106  } else {
1107  phpCAS :: trace('no need to authenticate (user `' . phpCAS :: getUser() . '\' is already authenticated)');
1108  }*/
1109 
1111  return $auth;
1112  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getAttribute()

static phpCAS::getAttribute (   $key)
static

Answer an attribute for the authenticated user.

Parameters
string$keyattribute name
Returns
mixed string for a single value or an array if multiple values exist.
Warning
should only be called after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().

Definition at line 1253 of file CAS.php.

References phpCAS\_validateClientExists(), and phpCAS\error().

1254  {
1256 
1257  try {
1258  return self::$_PHPCAS_CLIENT->getAttribute($key);
1259  } catch (Exception $e) {
1260  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1261  }
1262  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ getAttributes()

static phpCAS::getAttributes ( )
static

Answer attributes about the authenticated user.

Warning
should only be called after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().
Returns
array

Definition at line 1194 of file CAS.php.

References phpCAS\_validateClientExists(), and phpCAS\error().

1195  {
1197 
1198  try {
1199  return self::$_PHPCAS_CLIENT->getAttributes();
1200  } catch (Exception $e) {
1201  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1202  }
1203  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ getServerLoginURL()

static phpCAS::getServerLoginURL ( )
static

This method returns the URL to be used to login.

or phpCAS::isAuthenticated().

Returns
the login name of the authenticated user

Definition at line 1285 of file CAS.php.

References phpCAS\_validateClientExists().

1286  {
1288 
1289  return self::$_PHPCAS_CLIENT->getServerLoginURL();
1290  }
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ getServerLogoutURL()

static phpCAS::getServerLogoutURL ( )
static

This method returns the URL to be used to login.

or phpCAS::isAuthenticated().

Returns
the login name of the authenticated user

Definition at line 1393 of file CAS.php.

References phpCAS\_validateClientExists().

1394  {
1396 
1397  return self::$_PHPCAS_CLIENT->getServerLogoutURL();
1398  }
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ getServiceURL()

static phpCAS::getServiceURL ( )
static

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

Returns
string Service Url

Definition at line 1585 of file CAS.php.

References phpCAS\_validateProxyExists().

1586  {
1588  return (self::$_PHPCAS_CLIENT->getURL());
1589  }
static _validateProxyExists()
Checks of a proxy client aready exists.
Definition: CAS.php:1824
+ Here is the call graph for this function:

◆ getUser()

static phpCAS::getUser ( )
static

This method returns the CAS user's login name.

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

Definition at line 1175 of file CAS.php.

References phpCAS\_validateClientExists(), and phpCAS\error().

Referenced by ilAuthProviderCAS\doAuthentication(), ilCASAuth\getCASUser(), and ilCASAuth\login().

1176  {
1178 
1179  try {
1180  return self::$_PHPCAS_CLIENT->getUser();
1181  } catch (Exception $e) {
1182  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1183  }
1184  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleLogoutRequests()

static phpCAS::handleLogoutRequests (   $check_client = true,
  $allowed_clients = false 
)
static

Handle logout requests.

Parameters
bool$check_clientadditional safety check
array$allowed_clientsarray of allowed clients
Returns
void

Definition at line 1272 of file CAS.php.

References phpCAS\_validateClientExists().

1273  {
1275 
1276  return (self::$_PHPCAS_CLIENT->handleLogoutRequests($check_client, $allowed_clients));
1277  }
static handleLogoutRequests($check_client=true, $allowed_clients=false)
Handle logout requests.
Definition: CAS.php:1272
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ hasAttribute()

static phpCAS::hasAttribute (   $key)
static

Answer true if an attribute exists for the authenticated user.

Parameters
string$keyattribute name
Returns
bool
Warning
should only be called after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().

Definition at line 1233 of file CAS.php.

References phpCAS\_validateClientExists(), and phpCAS\error().

1234  {
1236 
1237  try {
1238  return self::$_PHPCAS_CLIENT->hasAttribute($key);
1239  } catch (Exception $e) {
1240  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1241  }
1242  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ hasAttributes()

static phpCAS::hasAttributes ( )
static

Answer true if there are attributes for the authenticated user.

Warning
should only be called after phpCAS::forceAuthentication() or phpCAS::checkAuthentication().
Returns
bool

Definition at line 1213 of file CAS.php.

References phpCAS\_validateClientExists(), and phpCAS\error().

1214  {
1216 
1217  try {
1218  return self::$_PHPCAS_CLIENT->hasAttributes();
1219  } catch (Exception $e) {
1220  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1221  }
1222  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ isAuthenticated()

static phpCAS::isAuthenticated ( )
static

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 1139 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1140  {
1143 
1144  // call the isAuthenticated method of the $_PHPCAS_CLIENT object
1145  $auth = self::$_PHPCAS_CLIENT->isAuthenticated();
1146 
1147  // store where the authentication has been checked and the result
1148  self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
1149 
1150  phpCAS :: traceEnd($auth);
1151  return $auth;
1152  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ isSessionAuthenticated()

static phpCAS::isSessionAuthenticated ( )
static

Checks whether authenticated based on $_SESSION.

Useful to avoid server calls.

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

Definition at line 1161 of file CAS.php.

References phpCAS\_validateClientExists().

1162  {
1164 
1165  return (self::$_PHPCAS_CLIENT->isSessionAuthenticated());
1166  }
static isSessionAuthenticated()
Checks whether authenticated based on $_SESSION.
Definition: CAS.php:1161
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ logout()

static phpCAS::logout (   $params = "")
static

This method is used to logout from CAS.

Parameters
string$paramsan array that contains the optional url and service parameters that will be passed to the CAS server
Returns
void

Definition at line 1430 of file CAS.php.

References $params, phpCAS\_validateClientExists(), array, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1431  {
1434 
1435  $parsedParams = array ();
1436  if ($params != "") {
1437  if (is_string($params)) {
1438  phpCAS :: error('method `phpCAS::logout($url)\' is now deprecated, use `phpCAS::logoutWithUrl($url)\' instead');
1439  }
1440  if (!is_array($params)) {
1441  phpCAS :: error('type mismatched for parameter $params (should be `array\')');
1442  }
1443  foreach ($params as $key => $value) {
1444  if ($key != "service" && $key != "url") {
1445  phpCAS :: error('only `url\' and `service\' parameters are allowed for method `phpCAS::logout($params)\'');
1446  }
1447  $parsedParams[$key] = $value;
1448  }
1449  }
1450  self::$_PHPCAS_CLIENT->logout($parsedParams);
1451  // never reached
1453  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
Create styles array
The data for the language used.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
$params
Definition: example_049.php:96
+ Here is the call graph for this function:

◆ logoutWithRedirectService()

static phpCAS::logoutWithRedirectService (   $service)
static

This method is used to logout from CAS.

Halts by redirecting to the CAS server.

Parameters
string$servicea URL that will be transmitted to the CAS server
Returns
void

Definition at line 1463 of file CAS.php.

References phpCAS\_validateClientExists(), array, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1464  {
1467 
1468  if (!is_string($service)) {
1469  phpCAS :: error('type mismatched for parameter $service (should be `string\')');
1470  }
1471  self::$_PHPCAS_CLIENT->logout(array ( "service" => $service ));
1472  // never reached
1474  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
Create styles array
The data for the language used.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ logoutWithRedirectServiceAndUrl()

static phpCAS::logoutWithRedirectServiceAndUrl (   $service,
  $url 
)
static

This method is used to logout from CAS.

Halts by redirecting to the CAS server.

Parameters
string$servicea URL that will be transmitted to the CAS server
string$urla URL that will be transmitted to the CAS server
Returns
void
Deprecated:
The url parameter has been removed from the CAS server as of version 3.3.5.1

Definition at line 1513 of file CAS.php.

References $url, phpCAS\_validateClientExists(), array, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1514  {
1515  trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
1518 
1519  if (!is_string($service)) {
1520  phpCAS :: error('type mismatched for parameter $service (should be `string\')');
1521  }
1522  if (!is_string($url)) {
1523  phpCAS :: error('type mismatched for parameter $url (should be `string\')');
1524  }
1525  self::$_PHPCAS_CLIENT->logout(
1526  array (
1527  "service" => $service,
1528  "url" => $url
1529  )
1530  );
1531  // never reached
1533  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
Create styles array
The data for the language used.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ logoutWithUrl()

static phpCAS::logoutWithUrl (   $url)
static

This method is used to logout from CAS.

Halts by redirecting to the CAS server.

Parameters
string$urla URL that will be transmitted to the CAS server
Returns
void
Deprecated:
The url parameter has been removed from the CAS server as of version 3.3.5.1

Definition at line 1486 of file CAS.php.

References $url, array, phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1487  {
1488  trigger_error('Function deprecated for cas servers >= 3.3.5.1', E_USER_DEPRECATED);
1490  if (!is_object(self::$_PHPCAS_CLIENT)) {
1491  phpCAS :: error('this method should only be called after ' . __CLASS__ . '::client() or' . __CLASS__ . '::proxy()');
1492  }
1493  if (!is_string($url)) {
1494  phpCAS :: error('type mismatched for parameter $url (should be `string\')');
1495  }
1496  self::$_PHPCAS_CLIENT->logout(array ( "url" => $url ));
1497  // never reached
1499  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
Create styles array
The data for the language used.
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
+ Here is the call graph for this function:

◆ renewAuthentication()

static phpCAS::renewAuthentication ( )
static

This method is called to renew the authentication.

Returns
void

Definition at line 1119 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1120  {
1123 
1124  $auth = self::$_PHPCAS_CLIENT->renewAuthentication();
1125 
1126  // store where the authentication has been checked and the result
1127  self::$_PHPCAS_CLIENT->markAuthenticationCall($auth);
1128 
1129  //self::$_PHPCAS_CLIENT->renewAuthentication();
1131  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ retrievePT()

static phpCAS::retrievePT (   $target_service,
$err_code,
$err_msg 
)
static

Retrieve a Proxy Ticket from the CAS server.

Parameters
string$target_serviceUrl string of service to proxy
string&$err_codeerror code
string&$err_msgerror message
Returns
string Proxy Ticket

Definition at line 1600 of file CAS.php.

References phpCAS\_validateProxyExists(), and phpCAS\error().

1601  {
1603 
1604  try {
1605  return (self::$_PHPCAS_CLIENT->retrievePT($target_service, $err_code, $err_msg));
1606  } catch (Exception $e) {
1607  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1608  }
1609  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static _validateProxyExists()
Checks of a proxy client aready exists.
Definition: CAS.php:1824
static retrievePT($target_service, & $err_code, & $err_msg)
Retrieve a Proxy Ticket from the CAS server.
Definition: CAS.php:1600
+ Here is the call graph for this function:

◆ setCacheTimesForAuthRecheck()

static phpCAS::setCacheTimesForAuthRecheck (   $n)
static

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
int$nan integer.
Returns
void

Definition at line 986 of file CAS.php.

References $n, phpCAS\_validateClientExists(), and phpCAS\error().

987  {
989 
990  try {
991  self::$_PHPCAS_CLIENT->setCacheTimesForAuthRecheck($n);
992  } catch (Exception $e) {
993  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
994  }
995  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$n
Definition: RandomTest.php:80
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setCasAttributeParserCallback()

static phpCAS::setCasAttributeParserCallback (   $function,
array  $additionalArgs = array() 
)
static

Set a callback function to be run when receiving CAS attributes.

The callback function will be passed an $success_elements payload of the response () as its first parameter.

Parameters
string$functionCallback function
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 1009 of file CAS.php.

References phpCAS\_validateClientExists().

1010  {
1012 
1013  self::$_PHPCAS_CLIENT->setCasAttributeParserCallback($function, $additionalArgs);
1014  }
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setCasServerCACert()

static phpCAS::setCasServerCACert (   $cert,
  $validate_cn = true 
)
static

Set the certificate of the CAS server CA and if the CN should be properly verified.

Parameters
string$certCA certificate file name
bool$validate_cnValidate CN in certificate (default true)
Returns
void

Definition at line 1620 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1621  {
1624 
1625  try {
1626  self::$_PHPCAS_CLIENT->setCasServerCACert($cert, $validate_cn);
1627  } catch (Exception $e) {
1628  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1629  }
1630 
1632  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setFixedCallbackURL()

static phpCAS::setFixedCallbackURL (   $url = '')
static

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
string$urlthe URL
Returns
void

Definition at line 1544 of file CAS.php.

References $url, phpCAS\_validateProxyExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1545  {
1548 
1549  try {
1550  self::$_PHPCAS_CLIENT->setCallbackURL($url);
1551  } catch (Exception $e) {
1552  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1553  }
1554 
1556  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static _validateProxyExists()
Checks of a proxy client aready exists.
Definition: CAS.php:1824
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
+ Here is the call graph for this function:

◆ setFixedServiceURL()

static phpCAS::setFixedServiceURL (   $url)
static

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
string$urlthe URL
Returns
void

Definition at line 1566 of file CAS.php.

References $url, phpCAS\_validateProxyExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by ilSoapAuthenticationCAS\__buildAuth().

1567  {
1570 
1571  try {
1572  self::$_PHPCAS_CLIENT->setURL($url);
1573  } catch (Exception $e) {
1574  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1575  }
1576 
1578  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static _validateProxyExists()
Checks of a proxy client aready exists.
Definition: CAS.php:1824
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNoCasServerValidation()

static phpCAS::setNoCasServerValidation ( )
static

Set no SSL validation for the CAS server.

Returns
void

Definition at line 1639 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by ilAuthProviderCAS\doAuthentication(), and ilAuthContainerCAS\initCAS().

1640  {
1643 
1644  phpCAS :: trace('You have configured no validation of the legitimacy of the cas server. This is not recommended for production use.');
1645  self::$_PHPCAS_CLIENT->setNoCasServerValidation();
1647  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static trace($str)
This method is used to log something in debug mode.
Definition: CAS.php:579
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setNoClearTicketsFromUrl()

static phpCAS::setNoClearTicketsFromUrl ( )
static

Disable the removal of a CAS-Ticket from the URL when authenticating DISABLING POSES A SECURITY RISK: We normally remove the ticket by an additional redirect as a security precaution to prevent a ticket in the HTTP_REFERRER or be carried over in the URL parameter.

Returns
void

Definition at line 1659 of file CAS.php.

References phpCAS\_validateClientExists(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1660  {
1663 
1664  self::$_PHPCAS_CLIENT->setNoClearTicketsFromUrl();
1666  }
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setPostAuthenticateCallback()

static phpCAS::setPostAuthenticateCallback (   $function,
array  $additionalArgs = array() 
)
static

Set a callback function to be run when a user authenticates.

The callback function will be passed a $logoutTicket as its first parameter, followed by any $additionalArgs you pass. The $logoutTicket parameter is an opaque string that can be used to map the session-id to logout request in order to support single-signout in applications that manage their own sessions (rather than letting phpCAS start the session).

phpCAS::forceAuthentication() will always exit and forward client unless they are already authenticated. To perform an action at the moment the user logs in (such as registering an account, performing logging, etc), register a callback function here.

Parameters
string$functionCallback function
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 1035 of file CAS.php.

References phpCAS\_validateClientExists().

1036  {
1038 
1039  self::$_PHPCAS_CLIENT->setPostAuthenticateCallback($function, $additionalArgs);
1040  }
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setServerLoginURL()

static phpCAS::setServerLoginURL (   $url = '')
static

Set the login URL of the CAS server.

Parameters
string$urlthe login URL
Returns
void
Since
0.4.21 by Wyman Chan

Definition at line 1300 of file CAS.php.

References $url, phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1301  {
1304 
1305  try {
1306  self::$_PHPCAS_CLIENT->setServerLoginURL($url);
1307  } catch (Exception $e) {
1308  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1309  }
1310 
1312  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setServerLogoutURL()

static phpCAS::setServerLogoutURL (   $url = '')
static

Set the logout URL of the CAS server.

Parameters
string$urlthe logout URL
Returns
void
Since
0.4.21 by Wyman Chan

Definition at line 1408 of file CAS.php.

References $url, phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1409  {
1412 
1413  try {
1414  self::$_PHPCAS_CLIENT->setServerLogoutURL($url);
1415  } catch (Exception $e) {
1416  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1417  }
1418 
1420  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setServerProxyValidateURL()

static phpCAS::setServerProxyValidateURL (   $url = '')
static

Set the proxyValidate URL of the CAS server.

Used for all CAS versions of proxy URL validations Examples: CAS 1.0 http://www.exemple.com/ CAS 2.0 http://www.exemple.com/proxyValidate CAS 3.0 http://www.exemple.com/p3/proxyValidate

Parameters
string$urlthe proxyValidate URL
Returns
void

Definition at line 1352 of file CAS.php.

References $url, phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1353  {
1356 
1357  try {
1358  self::$_PHPCAS_CLIENT->setServerProxyValidateURL($url);
1359  } catch (Exception $e) {
1360  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1361  }
1362 
1364  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setServerSamlValidateURL()

static phpCAS::setServerSamlValidateURL (   $url = '')
static

Set the samlValidate URL of the CAS server.

Parameters
string$urlthe samlValidate URL
Returns
void

Definition at line 1373 of file CAS.php.

References $url, phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1374  {
1377 
1378  try {
1379  self::$_PHPCAS_CLIENT->setServerSamlValidateURL($url);
1380  } catch (Exception $e) {
1381  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1382  }
1383 
1385  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setServerServiceValidateURL()

static phpCAS::setServerServiceValidateURL (   $url = '')
static

Set the serviceValidate URL of the CAS server.

Used for all CAS versions of URL validations. Examples: CAS 1.0 http://www.exemple.com/validate CAS 2.0 http://www.exemple.com/validateURL CAS 3.0 http://www.exemple.com/p3/serviceValidate

Parameters
string$urlthe serviceValidate URL
Returns
void

Definition at line 1326 of file CAS.php.

References $url, phpCAS\_validateClientExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

1327  {
1330 
1331  try {
1332  self::$_PHPCAS_CLIENT->setServerServiceValidateURL($url);
1333  } catch (Exception $e) {
1334  phpCAS :: error(get_class($e) . ': ' . $e->getMessage());
1335  }
1336 
1338  }
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
$url
Definition: shib_logout.php:72
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode...
Definition: CAS.php:591
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function:

◆ setSingleSignoutCallback()

static phpCAS::setSingleSignoutCallback (   $function,
array  $additionalArgs = array() 
)
static

Set a callback function to be run when a single-signout request is received.

The callback function will be passed a $logoutTicket as its first parameter, followed by any $additionalArgs you pass. The $logoutTicket parameter is an opaque string that can be used to map a session-id to the logout request in order to support single-signout in applications that manage their own sessions (rather than letting phpCAS start and destroy the session).

Parameters
string$functionCallback function
array$additionalArgsoptional array of arguments
Returns
void

Definition at line 1056 of file CAS.php.

References phpCAS\_validateClientExists().

1057  {
1059 
1060  self::$_PHPCAS_CLIENT->setSingleSignoutCallback($function, $additionalArgs);
1061  }
static _validateClientExists()
Checks if a client already exists.
Definition: CAS.php:1810
+ Here is the call graph for this function: