Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages | Examples

PGT storage
[CAS Proxy features (CAS 2.0, Proxy Granting Tickets)]


Modules

group  PGT storage in a database
group  PGT storage on the filesystem

Classes

class  PGTStorage

Functions

 CASClient::initPGTStorage ()
 CASClient::storePGT ($pgt, $pgt_iou)
 CASClient::loadPGT ($pgt_iou)
 CASClient::setPGTStorageFile ($format='', $path='')
 CASClient::setPGTStorageDB ($user, $password, $database_type, $hostname, $port, $database, $table)
 CASClient::validatePGT (&$validate_url, $text_response, $tree_response)
 CASClient::retrievePT ($target_service, &$err_code, &$err_msg)
 CASClient::readURL ($url, $cookies, &$headers, &$body, &$err_msg)
 CASClient::serviceWeb ($url, &$err_code, &$output)
 CASClient::serviceMail ($url, $flags, &$err_code, &$err_msg, &$pt)
 PGTStorage::PGTStorage ($cas_parent)
 PGTStorage::getStorageType ()
 PGTStorage::getStorageInfo ()
 PGTStorage::setErrorMessage ($error_message)
 PGTStorage::getErrorMessage ()
 PGTStorage::isInitialized ()
 PGTStorage::init ()
 PGTStorage::write ($pgt, $pgt_iou)
 PGTStorage::read ($pgt_iou)

Variables

 CASClient::$_pgt_storage
 PGTStorage::$_error_message
 PGTStorage::$_initialized

Function Documentation

PGTStorage::getErrorMessage  )  [inherited]
 

This method returns an error message set by PGTStorage::setErrorMessage().

Returns:
an error message when set by PGTStorage::setErrorMessage(), FALSE otherwise.

Deprecated:
not used.

Definition at line 108 of file pgt-main.php.

PGTStorage::getStorageInfo  )  [inherited]
 

This virtual method returns an informational string giving informations on the parameters of the storage.(used for debugging purposes).

Reimplemented in PGTStorageDB, and PGTStorageFile.

Definition at line 66 of file pgt-main.php.

PGTStorage::getStorageType  )  [inherited]
 

This virtual method returns an informational string giving the type of storage used by the object (used for debugging purposes).

Reimplemented in PGTStorageDB, and PGTStorageFile.

Definition at line 55 of file pgt-main.php.

PGTStorage::init  )  [protected, inherited]
 

This virtual method initializes the object.

Reimplemented in PGTStorageDB, and PGTStorageFile.

Definition at line 143 of file pgt-main.php.

CASClient::initPGTStorage  )  [private, inherited]
 

This method is used to initialize the storage of PGT's. Halts on error.

Definition at line 1241 of file client.php.

References CASClient::setPGTStorageFile().

Referenced by CASClient::loadPGT(), and CASClient::storePGT().

PGTStorage::isInitialized  )  [protected, inherited]
 

This method tells if the storage has already been intialized.

Returns:
a boolean

Definition at line 133 of file pgt-main.php.

Referenced by PGTStorageFile::init(), and PGTStorageDB::init().

CASClient::loadPGT pgt_iou  )  [private, inherited]
 

This method reads a PGT from its Iou and deletes the corresponding storage entry.

Parameters:
$pgt_iou the PGT Iou
Returns:
The PGT corresponding to the Iou, FALSE when not found.

Definition at line 1277 of file client.php.

References CASClient::initPGTStorage(), and CASClient::loadPGT().

Referenced by CASClient::loadPGT().

PGTStorage::PGTStorage cas_parent  )  [protected, inherited]
 

The constructor of the class, should be called only by inherited classes.

Parameters:
$cas_parent the CASclient instance that creates the current object.

Definition at line 36 of file pgt-main.php.

References phpCAS::traceBegin().

PGTStorage::read pgt_iou  )  [protected, inherited]
 

This virtual method reads a PGT corresponding to a PGT Iou and deletes the corresponding storage entry.

Note:
Should never be called.
Parameters:
$pgt_iou the PGT iou

Reimplemented in PGTStorageFile.

Definition at line 175 of file pgt-main.php.

References PGTStorage::read().

Referenced by PGTStorage::read().

CASClient::readURL url,
cookies,
&$  headers,
&$  body,
&$  err_msg
[private, inherited]
 

This method is used to acces a remote URL.

Parameters:
$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.
Returns:
TRUE on success, FALSE otherwise (in this later case, $err_msg contains an error message).

Definition at line 1511 of file client.php.

References CASClient::readURL(), and phpCAS::traceBegin().

Referenced by CASClient::readURL(), CASClient::retrievePT(), and CASClient::validateST().

CASClient::retrievePT target_service,
&$  err_code,
&$  err_msg
[private, inherited]
 

This method is used to retrieve PT's from the CAS server thanks to a PGT.

Parameters:
$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).
Returns:
a Proxy Ticket, or FALSE on error.

Definition at line 1403 of file client.php.

References domxml_open_mem(), CASClient::getServerProxyURL(), PHPCAS_SERVICE_OK, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, CASClient::readURL(), CASClient::retrievePT(), and phpCAS::traceBegin().

Referenced by CASClient::retrievePT().

CASClient::serviceMail url,
flags,
&$  err_code,
&$  err_msg,
&$  pt
[inherited]
 

This method is used to access an IMAP/POP3/NNTP service.

Parameters:
$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).
Returns:
an IMAP stream on success, FALSE otherwise (in this later case, $err_code gives the reason why it failed and $err_msg contains an error message).

Definition at line 1674 of file client.php.

References CAS_STR_SERVICE_UNAVAILABLE, CASClient::serviceMail(), and phpCAS::traceBegin().

Referenced by CASClient::serviceMail().

CASClient::serviceWeb url,
&$  err_code,
&$  output
[inherited]
 

This method is used to access an HTTP[S] service.

Parameters:
$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).
Returns:
TRUE on success, FALSE otherwise (in this later case, $err_code gives the reason why it failed and $output contains an error message).

Definition at line 1594 of file client.php.

References CAS_STR_SERVICE_UNAVAILABLE, CASClient::serviceWeb(), and phpCAS::traceBegin().

Referenced by CASClient::serviceWeb().

PGTStorage::setErrorMessage error_message  )  [protected, inherited]
 

This method sets en error message, which can be read later by PGTStorage::getErrorMessage().

Parameters:
$error_message an error message

Deprecated:
not used.

Definition at line 94 of file pgt-main.php.

References PGTStorage::setErrorMessage().

Referenced by PGTStorage::setErrorMessage().

CASClient::setPGTStorageDB user,
password,
database_type,
hostname,
port,
database,
table
[inherited]
 

This method is used to tell phpCAS to store the response of the CAS server to PGT requests into a database.

Note:
The connection to the database is done only when needed. As a consequence, bad parameters are detected only when initializing PGT storage.
Parameters:
$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 1323 of file client.php.

References CASClient::setPGTStorageDB().

Referenced by CASClient::setPGTStorageDB().

CASClient::setPGTStorageFile format = '',
path = ''
[inherited]
 

This method is used to tell phpCAS to store the response of the CAS server to PGT requests onto the filesystem.

Parameters:
$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 1294 of file client.php.

References CASClient::setPGTStorageFile().

Referenced by CASClient::initPGTStorage(), and CASClient::setPGTStorageFile().

CASClient::storePGT pgt,
pgt_iou
[private, inherited]
 

This method stores a PGT. Halts on error.

Parameters:
$pgt the PGT to store
$pgt_iou its corresponding Iou

Definition at line 1260 of file client.php.

References CASClient::initPGTStorage(), and CASClient::storePGT().

Referenced by CASClient::storePGT().

CASClient::validatePGT &$  validate_url,
text_response,
tree_response
[private, inherited]
 

This method is used to validate a PGT; halt on failure.

Parameters:
$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().
Returns:
bool TRUE when successfull, halt otherwise by calling CASClient::authError().

Definition at line 1359 of file client.php.

References CASClient::authError(), phpCAS::traceBegin(), and CASClient::validatePGT().

Referenced by CASClient::isAuthenticated(), and CASClient::validatePGT().

PGTStorage::write pgt,
pgt_iou
[protected, inherited]
 

This virtual method stores a PGT and its corresponding PGT Iuo.

Note:
Should never be called.
Parameters:
$pgt the PGT
$pgt_iou the PGT iou

Reimplemented in PGTStorageFile.

Definition at line 161 of file pgt-main.php.

References PGTStorage::write().

Referenced by PGTStorage::write().


Variable Documentation

PGTStorage::$_error_message [private, inherited]
 

string used to store an error message. Written by PGTStorage::setErrorMessage(), read by PGTStorage::getErrorMessage().

Deprecated:
not used.

Definition at line 83 of file pgt-main.php.

PGTStorage::$_initialized [private, inherited]
 

a boolean telling if the storage has already been initialized. Written by PGTStorage::init(), read by PGTStorage::isInitialized().

Definition at line 124 of file pgt-main.php.

CASClient::$_pgt_storage [private, inherited]
 

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 1233 of file client.php.


Generated on Thu Aug 17 02:03:22 2006 for phpCAS by doxygen 1.3.7