ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
+ Collaboration diagram for Callback from the CAS server:

Functions

 CASClient::setCallbackMode ($callback_mode)
 This method sets/unsets callback mode. More...
 
 CASClient::isCallbackMode ()
 This method returns TRUE when the CAs client is running i callback mode, FALSE otherwise. More...
 
 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). More...
 
 CASClient::setCallbackURL ($url)
 This method sets the callback url. More...
 
 CASClient::callback ()
 This method is called by CASClient::CASClient() when running in callback mode. More...
 

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. More...
 
 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). More...
 

Detailed Description

Function Documentation

◆ callback()

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

1850 {
1852 $this->printHTMLHeader('phpCAS callback');
1853 $pgt_iou = $_GET['pgtIou'];
1854 $pgt = $_GET['pgtId'];
1855 phpCAS::trace('Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\')');
1856 echo '<p>Storing PGT `'.$pgt.'\' (id=`'.$pgt_iou.'\').</p>';
1857 $this->storePGT($pgt,$pgt_iou);
1858 $this->printHTMLFooter();
1860 exit();
1861 }
$_GET["client_id"]
traceExit()
This method is used to indicate the end of the execution of the program.
Definition: CAS.php:617
trace($str)
This method is used to log something in debug mode.
Definition: CAS.php:569
traceBegin()
This method is used to indicate the start of the execution of a function in debug mode.
Definition: CAS.php:577
printHTMLHeader($title)
This method prints the header of the HTML output (after filtering).
Definition: client.php:108
exit
Definition: login.php:54

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

Referenced by CASClient\wasPreviouslyAuthenticated().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCallbackURL()

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

1797 {
1798 // the URL is built when needed only
1799 if ( empty($this->_callback_url) ) {
1800 $final_uri = '';
1801 // remove the ticket if present in the URL
1802 $final_uri = 'https://';
1803 /* replaced by Julien Marchal - v0.4.6
1804 * $this->uri .= $_SERVER['SERVER_NAME'];
1805 */
1806 if(empty($_SERVER['HTTP_X_FORWARDED_SERVER'])){
1807 /* replaced by teedog - v0.4.12
1808 * $final_uri .= $_SERVER['SERVER_NAME'];
1809 */
1810 if (empty($_SERVER['SERVER_NAME'])) {
1811 $final_uri .= $_SERVER['HTTP_HOST'];
1812 } else {
1813 $final_uri .= $_SERVER['SERVER_NAME'];
1814 }
1815 } else {
1816 $final_uri .= $_SERVER['HTTP_X_FORWARDED_SERVER'];
1817 }
1818 if ( ($this->isHttps() && $_SERVER['SERVER_PORT']!=443)
1819 || (!$this->isHttps() && $_SERVER['SERVER_PORT']!=80) ) {
1820 $final_uri .= ':';
1821 $final_uri .= $_SERVER['SERVER_PORT'];
1822 }
1823 $request_uri = $_SERVER['REQUEST_URI'];
1824 $request_uri = preg_replace('/\?.*$/','',$request_uri);
1825 $final_uri .= $request_uri;
1826 $this->setCallbackURL($final_uri);
1827 }
1828 return $this->_callback_url;
1829 }
$_callback_url
the URL that should be used for the PGT callback (in fact the URL of the current request without any ...
Definition: client.php:1785
setCallbackURL($url)
This method sets the callback url.
Definition: client.php:1838
isHttps()
This method checks to see if the request is secured via HTTPS.
Definition: client.php:547
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_SERVER.

Referenced by CASClient\validateST().

+ Here is the caller graph for this function:

◆ isCallbackMode()

CASClient::isCallbackMode ( )
private

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

Returns
A boolean.

Definition at line 1772 of file client.php.

1773 {
1774 return $this->_callback_mode;
1775 }
$_callback_mode
each PHP script using phpCAS in proxy mode is its own callback to get the PGT back from the CAS serve...
Definition: client.php:1750

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

+ Here is the caller graph for this function:

◆ setCallbackMode()

CASClient::setCallbackMode (   $callback_mode)
private

This method sets/unsets callback mode.

Parameters
$callback_modeTRUE to set callback mode, FALSE otherwise.

Definition at line 1759 of file client.php.

1760 {
1761 $this->_callback_mode = $callback_mode;
1762 }

Referenced by CASClient\CASClient().

+ Here is the caller graph for this function:

◆ setCallbackURL()

CASClient::setCallbackURL (   $url)
private

This method sets the callback url.

Parameters
$callback_urlurl to set callback

Definition at line 1838 of file client.php.

1839 {
1840 return $this->_callback_url = $url;
1841 }
$url
Definition: shib_logout.php:72

References $url.

Variable Documentation

◆ $_callback_mode

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

◆ $_callback_url

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