Functions | Variables

InternalCallback

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

Function Documentation

CASClient::callback (  )  [private, inherited]

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

References $_GET.

Referenced by CASClient::wasPreviouslyAuthenticated().

    {
      phpCAS::traceBegin();
      $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();
      phpCAS::traceExit();
    }

Here is the caller graph for this function:

CASClient::getCallbackURL (  )  [private, inherited]

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

References $request_uri.

    {
      // 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 ( ($_SERVER['HTTPS']=='on' && $_SERVER['SERVER_PORT']!=443)
               || ($_SERVER['HTTPS']!='on' && $_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);
      }
      return $this->_callback_url;
    }

CASClient::isCallbackMode (  )  [private, inherited]

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

Returns:
A boolean.

Definition at line 1083 of file client.php.

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

    {
      return $this->_callback_mode;
    }

Here is the caller graph for this function:

CASClient::setCallbackMode ( callback_mode  )  [private, inherited]

This method sets/unsets callback mode.

Parameters:
$callback_mode TRUE to set callback mode, FALSE otherwise.

Definition at line 1070 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, inherited]

This method sets the callback url.

Parameters:
$callback_url url to set callback

Definition at line 1150 of file client.php.

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


Variable Documentation

CASClient::$_callback_mode [private, inherited]

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

CASClient::$_callback_url [private, inherited]

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