ILIAS
release_4-4 Revision
|
Modules | |
PGT storage in a database | |
PGT storage on the filesystem | |
Data Structures | |
class | PGTStorage |
The PGTStorage class is a generic class for PGT storage. More... | |
Functions | |
CASClient::initPGTStorage () | |
This method is used to initialize the storage of PGT's. More... | |
CASClient::storePGT ($pgt, $pgt_iou) | |
This method stores a PGT. More... | |
CASClient::loadPGT ($pgt_iou) | |
This method reads a PGT from its Iou and deletes the corresponding storage entry. More... | |
CASClient::setPGTStorageFile ($format='', $path='') | |
This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem. More... | |
CASClient::setPGTStorageDB ($user, $password, $database_type, $hostname, $port, $database, $table) | |
This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database. More... | |
CASClient::validatePGT (&$validate_url, $text_response, $tree_response) | |
This method is used to validate a PGT; halt on failure. More... | |
CASClient::retrievePT ($target_service, &$err_code, &$err_msg) | |
This method is used to retrieve PT's from the CAS server thanks to a PGT. More... | |
CASClient::readURL ($url, $cookies, &$headers, &$body, &$err_msg) | |
This method is used to acces a remote URL. More... | |
CASClient::buildSAMLPayload () | |
This method is used to build the SAML POST body sent to /samlValidate URL. More... | |
CASClient::_curl_read_headers ($ch, $header) | |
CASClient::serviceWeb ($url, &$err_code, &$output) | |
This method is used to access an HTTP[S] service. More... | |
CASClient::serviceMail ($url, $service, $flags, &$err_code, &$err_msg, &$pt) | |
This method is used to access an IMAP/POP3/NNTP service. More... | |
PGTStorage::PGTStorage ($cas_parent) | |
The constructor of the class, should be called only by inherited classes. More... | |
PGTStorage::getStorageType () | |
This virtual method returns an informational string giving the type of storage used by the object (used for debugging purposes). More... | |
PGTStorage::getStorageInfo () | |
This virtual method returns an informational string giving informations on the parameters of the storage. More... | |
PGTStorage::setErrorMessage ($error_message) | |
This method sets en error message, which can be read later by PGTStorage::getErrorMessage(). More... | |
PGTStorage::getErrorMessage () | |
This method returns an error message set by PGTStorage::setErrorMessage(). More... | |
PGTStorage::isInitialized () | |
This method tells if the storage has already been intialized. More... | |
PGTStorage::init () | |
This virtual method initializes the object. More... | |
PGTStorage::write ($pgt, $pgt_iou) | |
This virtual method stores a PGT and its corresponding PGT Iuo. More... | |
PGTStorage::read ($pgt_iou) | |
This virtual method reads a PGT corresponding to a PGT Iou and deletes the corresponding storage entry. More... | |
CASClient::serviceMail ($url, $flags, &$err_code, &$err_msg, &$pt) | |
This method is used to access an IMAP/POP3/NNTP service. More... | |
Variables | |
CASClient::$_pgt_storage | |
an instance of a class inheriting of PGTStorage, used to deal with PGT storage. More... | |
CASClient::$_curl_headers = array() | |
This method is the callback used by readURL method to request HTTP headers. More... | |
PGTStorage::$_error_message | |
string used to store an error message. More... | |
PGTStorage::$_initialized | |
a boolean telling if the storage has already been initialized. More... | |
CASClient::_curl_read_headers | ( | $ch, | |
$header | |||
) |
Definition at line 2277 of file client.php.
|
private |
This method is used to build the SAML POST body sent to /samlValidate URL.
Definition at line 2259 of file client.php.
References CASClient\getSA(), SAML_SOAP_ENV, phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by CASClient\readURL().
PGTStorage::getErrorMessage | ( | ) |
This method returns an error message set by PGTStorage::setErrorMessage().
Definition at line 135 of file pgt-main.php.
References PGTStorage\$_error_message.
PGTStorage::getStorageInfo | ( | ) |
This virtual method returns an informational string giving informations on the parameters of the storage.
(used for debugging purposes).
Definition at line 93 of file pgt-main.php.
References phpCAS\error().
PGTStorage::getStorageType | ( | ) |
This virtual method returns an informational string giving the type of storage used by the object (used for debugging purposes).
Definition at line 82 of file pgt-main.php.
References phpCAS\error().
|
protected |
This virtual method initializes the object.
Definition at line 170 of file pgt-main.php.
|
private |
This method is used to initialize the storage of PGT's.
Halts on error.
Definition at line 1889 of file client.php.
References CASClient\setPGTStorageFile().
Referenced by CASClient\loadPGT(), and CASClient\storePGT().
|
protected |
This method tells if the storage has already been intialized.
Definition at line 160 of file pgt-main.php.
References PGTStorage\$_initialized.
Referenced by PGTStorageFile\init(), and PGTStorageDB\init().
|
private |
This method reads a PGT from its Iou and deletes the corresponding storage entry.
$pgt_iou | the PGT Iou |
Definition at line 1925 of file client.php.
References CASClient\initPGTStorage().
Referenced by CASClient\validatePGT().
|
protected |
The constructor of the class, should be called only by inherited classes.
$cas_parent | the CASclient instance that creates the current object. |
Definition at line 63 of file pgt-main.php.
References phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by PGTStorageDB\PGTStorageDB(), and PGTStorageFile\PGTStorageFile().
|
protected |
This virtual method reads a PGT corresponding to a PGT Iou and deletes the corresponding storage entry.
$pgt_iou | the PGT iou |
Definition at line 202 of file pgt-main.php.
References phpCAS\error().
|
private |
This method is used to acces a remote URL.
$url | the URL to access. |
$cookies | an array containing cookies strings such as 'name=val' |
$headers | an array containing the HTTP header lines of the response (an empty array on failure). |
$body | the body of the response, as a string (empty on failure). |
$err_msg | an error message, filled on failure. |
Definition at line 2163 of file client.php.
References CASClient\$_curl_headers, $data, $res, CASClient\buildSAMLPayload(), phpCAS\error(), CASClient\hasSA(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by CASClient\retrievePT(), CASClient\serviceWeb(), CASClient\validatePT(), CASClient\validateSA(), and CASClient\validateST().
|
private |
This method is used to retrieve PT's from the CAS server thanks to a PGT.
$target_service | the service to ask for with the PT. |
$err_code | an error code (PHPCAS_SERVICE_OK on success). |
$err_msg | an error message (empty on success). |
Definition at line 2053 of file client.php.
References domxml_open_mem(), CASClient\getPGT(), CASClient\getServerProxyURL(), CASClient\readURL(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by CASClient\serviceWeb().
CASClient::serviceMail | ( | $url, | |
$flags, | |||
& | $err_code, | ||
& | $err_msg, | ||
& | $pt | ||
) |
This method is used to access an IMAP/POP3/NNTP service.
$url | a string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open(). |
$flags | options given to imap_open(). |
$err_code | an error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT AVAILABLE. |
$err_msg | an error message on failure |
$pt | the Proxy Ticket (PT) retrieved from the CAS server to access the URL on success, FALSE on error). |
Definition at line 1633 of file client.php.
CASClient::serviceMail | ( | $url, | |
$service, | |||
$flags, | |||
& | $err_code, | ||
& | $err_msg, | ||
& | $pt | ||
) |
This method is used to access an IMAP/POP3/NNTP service.
$url | a string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open(). |
$service | a string giving for CAS retrieve Proxy ticket |
$flags | options given to imap_open(). |
$err_code | an error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT AVAILABLE. |
$err_msg | an error message on failure |
$pt | the Proxy Ticket (PT) retrieved from the CAS server to access the URL on success, FALSE on error). |
Definition at line 2381 of file client.php.
CASClient::serviceWeb | ( | $url, | |
& | $err_code, | ||
& | $output | ||
) |
This method is used to access an HTTP[S] service.
$url | the service to access. |
$err_code | an error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT AVAILABLE. |
$output | the output of the service (also used to give an error message on failure). |
Definition at line 2298 of file client.php.
References $_SESSION, $res, CAS_STR_SERVICE_UNAVAILABLE, CASClient\getString(), CASClient\readURL(), CASClient\retrievePT(), phpCAS\trace(), and phpCAS\traceBegin().
|
protected |
This method sets en error message, which can be read later by PGTStorage::getErrorMessage().
$error_message | an error message |
Definition at line 121 of file pgt-main.php.
CASClient::setPGTStorageDB | ( | $user, | |
$password, | |||
$database_type, | |||
$hostname, | |||
$port, | |||
$database, | |||
$table | |||
) |
This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database.
$user | the user to access the data with |
$password | the user's password |
$database_type | the type of the database hosting the data |
$hostname | the server hosting the database |
$port | the port the server is listening on |
$database | the name of the database |
$table | the name of the table storing the data |
Definition at line 1971 of file client.php.
References phpCAS\error().
CASClient::setPGTStorageFile | ( | $format = '' , |
|
$path = '' |
|||
) |
This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem.
$format | the format used to store the PGT's (`plain' and `xml' allowed) |
$path | the path where the PGT's should be stored |
Definition at line 1942 of file client.php.
References $path, and phpCAS\error().
Referenced by CASClient\initPGTStorage().
|
private |
This method stores a PGT.
Halts on error.
$pgt | the PGT to store |
$pgt_iou | its corresponding Iou |
Definition at line 1908 of file client.php.
References CASClient\initPGTStorage().
|
private |
This method is used to validate a PGT; halt on failure.
$validate_url | the URL of the request to the CAS server. |
$text_response | the response of the CAS server, as is (XML text); result of CASClient::validateST() or CASClient::validatePT(). |
$tree_response | the response of the CAS server, as a DOM XML tree; result of CASClient::validateST() or CASClient::validatePT(). |
Definition at line 2007 of file client.php.
References CASClient\authError(), CASClient\loadPGT(), phpCAS\log(), CASClient\setPGT(), and phpCAS\trace().
Referenced by CASClient\isAuthenticated().
|
protected |
This virtual method stores a PGT and its corresponding PGT Iuo.
$pgt | the PGT |
$pgt_iou | the PGT iou |
Definition at line 188 of file pgt-main.php.
References phpCAS\error().
CASClient::$_curl_headers = array() |
This method is the callback used by readURL method to request HTTP headers.
Definition at line 2276 of file client.php.
Referenced by CASClient\readURL().
|
private |
string used to store an error message.
Written by PGTStorage::setErrorMessage(), read by PGTStorage::getErrorMessage().
Written by PGTStorage::setErrorMessage(), read by PGTStorage::getErrorMessage().
Definition at line 110 of file pgt-main.php.
Referenced by PGTStorage\getErrorMessage(), and PGTStorage\getStorageInfo().
|
private |
a boolean telling if the storage has already been initialized.
Written by PGTStorage::init(), read by PGTStorage::isInitialized().
Definition at line 151 of file pgt-main.php.
Referenced by PGTStorage\getErrorMessage(), and PGTStorage\isInitialized().
|
private |
an instance of a class inheriting of PGTStorage, used to deal with PGT storage.
Created by CASClient::setPGTStorageFile() or CASClient::setPGTStorageDB(), used by CASClient::setPGTStorageFile(), CASClient::setPGTStorageDB() and CASClient::initPGTStorage().
Definition at line 1881 of file client.php.
Referenced by CASClient\callback().