ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Callback from the CAS server
+ Collaboration diagram for Callback from the CAS server:

Functions

 CASClient::setCallbackMode ($callback_mode)
 This method sets/unsets callback mode.
 CASClient::isCallbackMode ()
 This method returns TRUE when the CAs client is running i callback mode, FALSE otherwise.
 CASClient::getCallbackURL ()
 This method returns the URL that should be used for the PGT callback (in fact the URL of the current request without any CGI parameter, except if phpCAS::setFixedCallbackURL() was used).
 CASClient::setCallbackURL ($url)
 This method sets the callback url.
 CASClient::callback ()
 This method is called by CASClient::CASClient() when running in callback mode.

Variables

 CASClient::$_callback_mode
 each PHP script using phpCAS in proxy mode is its own callback to get the PGT back from the CAS server.
 CASClient::$_callback_url
 the URL that should be used for the PGT callback (in fact the URL of the current request without any CGI parameter).

Detailed Description

Function Documentation

CASClient::callback ( )
private

This method is called by CASClient::CASClient() when running in callback mode.

It stores the PGT and its PGT Iou, prints its output and halts.

Definition at line 1840 of file client.php.

References $_GET, exit, phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceExit().

Referenced by CASClient\wasPreviouslyAuthenticated().

{
$this->printHTMLHeader('phpCAS callback');
$pgt_iou = $_GET['pgtIou'];
$pgt = $_GET['pgtId'];
phpCAS::trace('Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\')');
echo '<p>Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\').</p>';
$this->storePGT($pgt,$pgt_iou);
$this->printHTMLFooter();
exit();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

CASClient::getCallbackURL ( )
private

This method returns the URL that should be used for the PGT callback (in fact the URL of the current request without any CGI parameter, except if phpCAS::setFixedCallbackURL() was used).

Returns
The callback URL

Definition at line 1787 of file client.php.

References $request_uri.

Referenced by CASClient\validateST().

{
// the URL is built when needed only
if ( empty($this->_callback_url) ) {
$final_uri = '';
// remove the ticket if present in the URL
$final_uri = 'https://';
/* replaced by Julien Marchal - v0.4.6
* $this->uri .= $_SERVER['SERVER_NAME'];
*/
if(empty($_SERVER['HTTP_X_FORWARDED_SERVER'])){
/* replaced by teedog - v0.4.12
* $final_uri .= $_SERVER['SERVER_NAME'];
*/
if (empty($_SERVER['SERVER_NAME'])) {
$final_uri .= $_SERVER['HTTP_HOST'];
} else {
$final_uri .= $_SERVER['SERVER_NAME'];
}
} else {
$final_uri .= $_SERVER['HTTP_X_FORWARDED_SERVER'];
}
if ( ($this->isHttps() && $_SERVER['SERVER_PORT']!=443)
|| (!$this->isHttps() && $_SERVER['SERVER_PORT']!=80) ) {
$final_uri .= ':';
$final_uri .= $_SERVER['SERVER_PORT'];
}
$request_uri = $_SERVER['REQUEST_URI'];
$request_uri = preg_replace('/\?.*$/','',$request_uri);
$final_uri .= $request_uri;
$this->setCallbackURL($final_uri);
}
}

+ Here is the caller graph for this function:

CASClient::isCallbackMode ( )
private

This method returns TRUE when the CAs client is running i callback mode, FALSE otherwise.

Returns
A boolean.

Definition at line 1763 of file client.php.

Referenced by CASClient\CASClient(), and CASClient\wasPreviouslyAuthenticated().

{
}

+ Here is the caller graph for this function:

CASClient::setCallbackMode (   $callback_mode)
private

This method sets/unsets callback mode.

Parameters
$callback_modeTRUE to set callback mode, FALSE otherwise.

Definition at line 1750 of file client.php.

Referenced by CASClient\CASClient().

{
$this->_callback_mode = $callback_mode;
}

+ Here is the caller graph for this function:

CASClient::setCallbackURL (   $url)
private

This method sets the callback url.

Parameters
$callback_urlurl to set callback

Definition at line 1829 of file client.php.

{
return $this->_callback_url = $url;
}

Variable Documentation

CASClient::$_callback_mode
private

each PHP script using phpCAS in proxy mode is its own callback to get the PGT back from the CAS server.

callback_mode is detected by the constructor thanks to the GET parameters. a boolean to know if the CAS client is running in callback mode. Written by CASClient::setCallBackMode(), read by CASClient::isCallbackMode().

Definition at line 1741 of file client.php.

CASClient::$_callback_url
private

the URL that should be used for the PGT callback (in fact the URL of the current request without any CGI parameter).

Written and read by CASClient::getCallbackURL().

Definition at line 1776 of file client.php.