ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
Miscellaneous
+ Collaboration diagram for Miscellaneous:

Functions

 CAS_Client::_readURL ($url, &$headers, &$body, &$err_msg)
 This method is used to acces a remote URL. More...
 
 CAS_Client::_buildSAMLPayload ()
 This method is used to build the SAML POST body sent to /samlValidate URL. More...
 
 CAS_Client::setURL ($url)
 This method sets the URL of the current request. More...
 
 CAS_Client::getURL ()
 This method returns the URL of the current request (without any ticket CGI parameter). More...
 
 CAS_Client::setBaseURL ($url)
 This method sets the base URL of the CAS server. More...
 
 CAS_Client::_getClientUrl ()
 Try to figure out the phpCas client URL with possible Proxys / Ports etc. More...
 
 CAS_Client::_isHttps ()
 This method checks to see if the request is secured via HTTPS. More...
 
 CAS_Client::_removeParameterFromQueryString ($parameterName, $queryString)
 Removes a parameter from a query string. More...
 
 CAS_Client::_buildQueryUrl ($url, $query)
 This method is used to append query parameters to an url. More...
 
 CAS_Client::_renameSession ($ticket)
 Renaming the session. More...
 
 CAS_Client::_authError ( $failure, $cas_url, $no_response, $bad_response='', $cas_response='', $err_code='', $err_msg='')
 This method is used to print the HTML output when the user was not authenticated. More...
 
 CAS_Client::_getNodeType ($nodeURL)
 Determine the node type from the URL. More...
 
 CAS_Client::addRebroadcastNode ($rebroadcastNodeUrl)
 Store the rebroadcast node for pgtIou/pgtId and logout requests. More...
 
 CAS_Client::addRebroadcastHeader ($header)
 This method is used to add header parameters when rebroadcasting pgtIou/pgtId or logoutRequest. More...
 
 CAS_Client::_rebroadcast ($type)
 This method rebroadcasts logout/pgtIou requests. More...
 

Variables

 CAS_Client::$_url
 the URL of the current request (without any ticket CGI parameter). More...
 
 CAS_Client::$_rebroadcast = false
 Boolean of whether to rebroadcast pgtIou/pgtId and logoutRequest, and array of the nodes. More...
 
 CAS_Client::$_rebroadcast_nodes = array()
 
const CAS_Client::HOSTNAME = 0
 Constants used for determining rebroadcast node type. More...
 
const CAS_Client::IP = 1
 
 CAS_Client::$_rebroadcast_headers = array()
 An array to store extra rebroadcast curl options. More...
 
const CAS_Client::LOGOUT = 0
 Constants used for determining rebroadcast type (logout or pgtIou/pgtId). More...
 
const CAS_Client::PGTIOU = 1
 

Detailed Description

Function Documentation

◆ _authError()

CAS_Client::_authError (   $failure,
  $cas_url,
  $no_response,
  $bad_response = '',
  $cas_response = '',
  $err_code = '',
  $err_msg = '' 
)
private

This method is used to print the HTML output when the user was not authenticated.

Parameters
string$failurethe failure that occured
string$cas_urlthe URL the CAS server was asked for
bool$no_responsethe response from the CAS server (other parameters are ignored if true)
bool$bad_responsebad response from the CAS server ($err_code and $err_msg ignored if true)
string$cas_responsethe response of the CAS server
int$err_codethe error code given by the CAS server
string$err_msgthe error message given by the CAS server
Returns
void

Definition at line 3724 of file Client.php.

3732 {
3734 $lang = $this->getLangObj();
3735 $this->printHTMLHeader($lang->getAuthenticationFailed());
3736 printf(
3737 $lang->getYouWereNotAuthenticated(), htmlentities($this->getURL()),
3738 isset($_SERVER['SERVER_ADMIN']) ? $_SERVER['SERVER_ADMIN']:''
3739 );
3740 phpCAS::trace('CAS URL: '.$cas_url);
3741 phpCAS::trace('Authentication failure: '.$failure);
3742 if ( $no_response ) {
3743 phpCAS::trace('Reason: no response from the CAS server');
3744 } else {
3745 if ( $bad_response ) {
3746 phpCAS::trace('Reason: bad response from the CAS server');
3747 } else {
3748 switch ($this->getServerVersion()) {
3749 case CAS_VERSION_1_0:
3750 phpCAS::trace('Reason: CAS error');
3751 break;
3752 case CAS_VERSION_2_0:
3753 case CAS_VERSION_3_0:
3754 if ( empty($err_code) ) {
3755 phpCAS::trace('Reason: no CAS error');
3756 } else {
3758 'Reason: ['.$err_code.'] CAS error: '.$err_msg
3759 );
3760 }
3761 break;
3762 }
3763 }
3764 phpCAS::trace('CAS response: '.$cas_response);
3765 }
3766 $this->printHTMLFooter();
3769 }
$failure
$lang
Definition: consent.php:3
getServerVersion()
This method is used to retrieve the version of the CAS server.
Definition: Client.php:273
getLangObj()
Create the language.
Definition: Client.php:222
getURL()
This method returns the URL of the current request (without any ticket CGI parameter).
Definition: Client.php:3524
printHTMLFooter()
This method prints the footer of the HTML output (after filtering).
Definition: Client.php:129
printHTMLHeader($title)
This method prints the header of the HTML output (after filtering).
Definition: Client.php:101
static trace($str)
This method is used to log something in debug mode.
Definition: CAS.php:579
static traceBegin()
This method is used to indicate the start of the execution of a function in debug mode.
Definition: CAS.php:591
static traceExit()
This method is used to indicate the end of the execution of the program.
Definition: CAS.php:661
const CAS_VERSION_3_0
CAS version 3.0.
Definition: CAS.php:82
const CAS_VERSION_1_0
CAS version 1.0.
Definition: CAS.php:74
const CAS_VERSION_2_0
Definition: CAS.php:78
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_SERVER, $failure, $lang, CAS_VERSION_1_0, CAS_VERSION_2_0, CAS_VERSION_3_0, CAS_Client\getLangObj(), CAS_Client\getServerVersion(), CAS_Client\getURL(), CAS_Client\printHTMLFooter(), CAS_Client\printHTMLHeader(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceExit().

+ Here is the call graph for this function:

◆ _buildQueryUrl()

CAS_Client::_buildQueryUrl (   $url,
  $query 
)
private

This method is used to append query parameters to an url.

Since the url might already contain parameter it has to be detected and to build a proper URL

Parameters
string$urlbase url to add the query params to
string$queryparams in query form with & separated
Returns
url with query params

Definition at line 3662 of file Client.php.

3663 {
3664 $url .= (strstr($url, '?') === false) ? '?' : '&';
3665 $url .= $query;
3666 return $url;
3667 }
$query
$url

References $query, and $url.

Referenced by CAS_Client\getServerLoginURL(), CAS_Client\getServerProxyValidateURL(), CAS_Client\getServerSamlValidateURL(), and CAS_Client\getServerServiceValidateURL().

+ Here is the caller graph for this function:

◆ _buildSAMLPayload()

CAS_Client::_buildSAMLPayload ( )
private

This method is used to build the SAML POST body sent to /samlValidate URL.

Returns
the SOAP-encased SAMLP artifact (the ticket).

Definition at line 2845 of file Client.php.

2846 {
2848
2849 //get the ticket
2850 $sa = urlencode($this->getTicket());
2851
2852 $body = SAML_SOAP_ENV.SAML_SOAP_BODY.SAMLP_REQUEST
2853 .SAML_ASSERTION_ARTIFACT.$sa.SAML_ASSERTION_ARTIFACT_CLOSE
2854 .SAMLP_REQUEST_CLOSE.SAML_SOAP_BODY_CLOSE.SAML_SOAP_ENV_CLOSE;
2855
2856 phpCAS::traceEnd($body);
2857 return ($body);
2858 }
getTicket()
This method returns the Service Ticket provided in the URL of the request.
Definition: Client.php:1870
static traceEnd($res='')
This method is used to indicate the end of the execution of a function in debug mode.
Definition: CAS.php:638
const SAML_SOAP_ENV
SOAP envelope for SAML POST.
Definition: CAS.php:101

References CAS_Client\getTicket(), SAML_SOAP_ENV, phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by CAS_Client\_readURL().

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

◆ _getClientUrl()

CAS_Client::_getClientUrl ( )
private

Try to figure out the phpCas client URL with possible Proxys / Ports etc.

Returns
string Server URL with domain:port

Definition at line 3577 of file Client.php.

3578 {
3579 $server_url = '';
3580 if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
3581 // explode the host list separated by comma and use the first host
3582 $hosts = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
3583 // see rfc7239#5.3 and rfc7230#2.7.1: port is in HTTP_X_FORWARDED_HOST if non default
3584 return $hosts[0];
3585 } else if (!empty($_SERVER['HTTP_X_FORWARDED_SERVER'])) {
3586 $server_url = $_SERVER['HTTP_X_FORWARDED_SERVER'];
3587 } else {
3588 if (empty($_SERVER['SERVER_NAME'])) {
3589 $server_url = $_SERVER['HTTP_HOST'];
3590 } else {
3591 $server_url = $_SERVER['SERVER_NAME'];
3592 }
3593 }
3594 if (!strpos($server_url, ':')) {
3595 if (empty($_SERVER['HTTP_X_FORWARDED_PORT'])) {
3596 $server_port = $_SERVER['SERVER_PORT'];
3597 } else {
3598 $ports = explode(',', $_SERVER['HTTP_X_FORWARDED_PORT']);
3599 $server_port = $ports[0];
3600 }
3601
3602 if ( ($this->_isHttps() && $server_port!=443)
3603 || (!$this->_isHttps() && $server_port!=80)
3604 ) {
3605 $server_url .= ':';
3606 $server_url .= $server_port;
3607 }
3608 }
3609 return $server_url;
3610 }
_isHttps()
This method checks to see if the request is secured via HTTPS.
Definition: Client.php:3617

References $_SERVER, and CAS_Client\_isHttps().

Referenced by CAS_Client\_getCallbackURL(), and CAS_Client\getURL().

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

◆ _getNodeType()

CAS_Client::_getNodeType (   $nodeURL)
private

Determine the node type from the URL.

Parameters
String$nodeURLThe node URL.
Returns
string hostname

Definition at line 3796 of file Client.php.

3797 {
3799 if (preg_match("/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/", $nodeURL)) {
3800 phpCAS::traceEnd(self::IP);
3801 return self::IP;
3802 } else {
3803 phpCAS::traceEnd(self::HOSTNAME);
3804 return self::HOSTNAME;
3805 }
3806 }
const HOSTNAME
Constants used for determining rebroadcast node type.
Definition: Client.php:3785
const IP
Definition: Client.php:3786

References CAS_Client\HOSTNAME, CAS_Client\IP, phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by CAS_Client\_rebroadcast().

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

◆ _isHttps()

CAS_Client::_isHttps ( )
private

This method checks to see if the request is secured via HTTPS.

Returns
bool true if https, false otherwise

Definition at line 3617 of file Client.php.

3618 {
3619 if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
3620 return ($_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https');
3621 } elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTOCOL'])) {
3622 return ($_SERVER['HTTP_X_FORWARDED_PROTOCOL'] === 'https');
3623 } elseif ( isset($_SERVER['HTTPS'])
3624 && !empty($_SERVER['HTTPS'])
3625 && strcasecmp($_SERVER['HTTPS'], 'off') !== 0
3626 ) {
3627 return true;
3628 }
3629 return false;
3630
3631 }

References $_SERVER.

Referenced by CAS_Client\__construct(), CAS_Client\_getClientUrl(), and CAS_Client\getURL().

+ Here is the caller graph for this function:

◆ _readURL()

CAS_Client::_readURL (   $url,
$headers,
$body,
$err_msg 
)
private

This method is used to acces a remote URL.

Parameters
string$urlthe URL to access.
string&$headersan array containing the HTTP header lines of the response (an empty array on failure).
string&$bodythe body of the response, as a string (empty on failure).
string&$err_msgan error message, filled on failure.
Returns
true on success, false otherwise (in this later case, $err_msg contains an error message).

Definition at line 2790 of file Client.php.

2791 {
2793 $className = $this->_requestImplementation;
2794 $request = new $className();
2795
2796 if (count($this->_curl_options)) {
2797 $request->setCurlOptions($this->_curl_options);
2798 }
2799
2800 $request->setUrl($url);
2801
2802 if (empty($this->_cas_server_ca_cert) && !$this->_no_cas_server_validation) {
2804 'one of the methods phpCAS::setCasServerCACert() or phpCAS::setNoCasServerValidation() must be called.'
2805 );
2806 }
2807 if ($this->_cas_server_ca_cert != '') {
2808 $request->setSslCaCert(
2809 $this->_cas_server_ca_cert, $this->_cas_server_cn_validate
2810 );
2811 }
2812
2813 // add extra stuff if SAML
2814 if ($this->getServerVersion() == SAML_VERSION_1_1) {
2815 $request->addHeader("soapaction: http://www.oasis-open.org/committees/security");
2816 $request->addHeader("cache-control: no-cache");
2817 $request->addHeader("pragma: no-cache");
2818 $request->addHeader("accept: text/xml");
2819 $request->addHeader("connection: keep-alive");
2820 $request->addHeader("content-type: text/xml");
2821 $request->makePost();
2822 $request->setPostBody($this->_buildSAMLPayload());
2823 }
2824
2825 if ($request->send()) {
2826 $headers = $request->getResponseHeaders();
2827 $body = $request->getResponseBody();
2828 $err_msg = '';
2829 phpCAS::traceEnd(true);
2830 return true;
2831 } else {
2832 $headers = '';
2833 $body = '';
2834 $err_msg = $request->getErrorMessage();
2835 phpCAS::traceEnd(false);
2836 return false;
2837 }
2838 }
$_requestImplementation
The class to instantiate for making web requests in readUrl().
Definition: Client.php:601
_buildSAMLPayload()
This method is used to build the SAML POST body sent to /samlValidate URL.
Definition: Client.php:2845
static error($msg)
This method is used by interface methods to print an error and where the function was originally call...
Definition: CAS.php:543
const SAML_VERSION_1_1
SAML protocol.
Definition: CAS.php:91

References CAS_Client\$_requestImplementation, $url, CAS_Client\_buildSAMLPayload(), phpCAS\error(), CAS_Client\getServerVersion(), SAML_VERSION_1_1, phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by CAS_Client\retrievePT(), CAS_Client\validateCAS10(), and CAS_Client\validateCAS20().

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

◆ _rebroadcast()

CAS_Client::_rebroadcast (   $type)
private

This method rebroadcasts logout/pgtIou requests.

Can be LOGOUT,PGTIOU

Parameters
int$typetype of rebroadcasting.
Returns
void

Definition at line 3860 of file Client.php.

3861 {
3863
3864 $rebroadcast_curl_options = array(
3865 CURLOPT_FAILONERROR => 1,
3866 CURLOPT_FOLLOWLOCATION => 1,
3867 CURLOPT_RETURNTRANSFER => 1,
3868 CURLOPT_CONNECTTIMEOUT => 1,
3869 CURLOPT_TIMEOUT => 4);
3870
3871 // Try to determine the IP address of the server
3872 if (!empty($_SERVER['SERVER_ADDR'])) {
3873 $ip = $_SERVER['SERVER_ADDR'];
3874 } else if (!empty($_SERVER['LOCAL_ADDR'])) {
3875 // IIS 7
3876 $ip = $_SERVER['LOCAL_ADDR'];
3877 }
3878 // Try to determine the DNS name of the server
3879 if (!empty($ip)) {
3880 $dns = gethostbyaddr($ip);
3881 }
3882 $multiClassName = 'CAS_Request_CurlMultiRequest';
3883 $multiRequest = new $multiClassName();
3884
3885 for ($i = 0; $i < sizeof($this->_rebroadcast_nodes); $i++) {
3886 if ((($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::HOSTNAME) && !empty($dns) && (stripos($this->_rebroadcast_nodes[$i], $dns) === false))
3887 || (($this->_getNodeType($this->_rebroadcast_nodes[$i]) == self::IP) && !empty($ip) && (stripos($this->_rebroadcast_nodes[$i], $ip) === false))
3888 ) {
3890 'Rebroadcast target URL: '.$this->_rebroadcast_nodes[$i]
3891 .$_SERVER['REQUEST_URI']
3892 );
3893 $className = $this->_requestImplementation;
3894 $request = new $className();
3895
3896 $url = $this->_rebroadcast_nodes[$i].$_SERVER['REQUEST_URI'];
3897 $request->setUrl($url);
3898
3899 if (count($this->_rebroadcast_headers)) {
3900 $request->addHeaders($this->_rebroadcast_headers);
3901 }
3902
3903 $request->makePost();
3904 if ($type == self::LOGOUT) {
3905 // Logout request
3906 $request->setPostBody(
3907 'rebroadcast=false&logoutRequest='.$_POST['logoutRequest']
3908 );
3909 } else if ($type == self::PGTIOU) {
3910 // pgtIou/pgtId rebroadcast
3911 $request->setPostBody('rebroadcast=false');
3912 }
3913
3914 $request->setCurlOptions($rebroadcast_curl_options);
3915
3916 $multiRequest->addRequest($request);
3917 } else {
3919 'Rebroadcast not sent to self: '
3920 .$this->_rebroadcast_nodes[$i].' == '.(!empty($ip)?$ip:'')
3921 .'/'.(!empty($dns)?$dns:'')
3922 );
3923 }
3924 }
3925 // We need at least 1 request
3926 if ($multiRequest->getNumRequests() > 0) {
3927 $multiRequest->send();
3928 }
3930 }
$_POST["username"]
$i
Definition: disco.tpl.php:19
_getNodeType($nodeURL)
Determine the node type from the URL.
Definition: Client.php:3796
$_rebroadcast_nodes
Definition: Client.php:3780
$type

References $_POST, CAS_Client\$_rebroadcast_nodes, CAS_Client\$_requestImplementation, $_SERVER, $i, $type, $url, CAS_Client\_getNodeType(), CAS_Client\IP, phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by CAS_Client\_wasPreviouslyAuthenticated(), CAS_Client\addRebroadcastNode(), and CAS_Client\handleLogoutRequests().

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

◆ _removeParameterFromQueryString()

CAS_Client::_removeParameterFromQueryString (   $parameterName,
  $queryString 
)
private

Removes a parameter from a query string.

Parameters
string$parameterNamename of parameter
string$queryStringquery string
Returns
string new query string

http://stackoverflow.com/questions/1842681/regular-expression-to-remove-one-parameter-from-query-string

Definition at line 3643 of file Client.php.

3644 {
3645 $parameterName = preg_quote($parameterName);
3646 return preg_replace(
3647 "/&$parameterName(=[^&]*)?|^$parameterName(=[^&]*)?&?/",
3648 '', $queryString
3649 );
3650 }

Referenced by CAS_Client\getURL().

+ Here is the caller graph for this function:

◆ _renameSession()

CAS_Client::_renameSession (   $ticket)
private

Renaming the session.

Parameters
string$ticketname of the ticket
Returns
void

Definition at line 3676 of file Client.php.

3677 {
3679 if ($this->getChangeSessionID()) {
3680 if (!empty($this->_user)) {
3681 $old_session = $_SESSION;
3682 phpCAS :: trace("Killing session: ". session_id());
3683 session_destroy();
3684 // set up a new session, of name based on the ticket
3685 $session_id = preg_replace('/[^a-zA-Z0-9\-]/', '', $ticket);
3686 phpCAS :: trace("Starting session: ". $session_id);
3687 session_id($session_id);
3688 session_start();
3689 phpCAS :: trace("Restoring old session vars");
3690 $_SESSION = $old_session;
3691 } else {
3693 'Session should only be renamed after successfull authentication'
3694 );
3695 }
3696 } else {
3698 "Skipping session rename since phpCAS is not handling the session."
3699 );
3700 }
3702 }
$_SESSION["AccountId"]
getChangeSessionID()
Get whether phpCas is allowed to change session_id.
Definition: Client.php:1072

References $_SESSION, CAS_Client\getChangeSessionID(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

+ Here is the call graph for this function:

◆ addRebroadcastHeader()

CAS_Client::addRebroadcastHeader (   $header)

This method is used to add header parameters when rebroadcasting pgtIou/pgtId or logoutRequest.

Parameters
string$headerHeader to send when rebroadcasting.
Returns
void

Definition at line 3839 of file Client.php.

3840 {
3841 if (gettype($header) != 'string')
3842 throw new CAS_TypeMismatchException($header, '$header', 'string');
3843
3844 $this->_rebroadcast_headers[] = $header;
3845 }

References $header.

◆ addRebroadcastNode()

CAS_Client::addRebroadcastNode (   $rebroadcastNodeUrl)

Store the rebroadcast node for pgtIou/pgtId and logout requests.

Parameters
string$rebroadcastNodeUrlThe rebroadcast node URL.
Returns
void

Definition at line 3815 of file Client.php.

3816 {
3817 // Argument validation
3818 if ( !(bool)preg_match("/^(http|https):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $rebroadcastNodeUrl))
3819 throw new CAS_TypeMismatchException($rebroadcastNodeUrl, '$rebroadcastNodeUrl', 'url');
3820
3821 // Store the rebroadcast node and set flag
3822 $this->_rebroadcast = true;
3823 $this->_rebroadcast_nodes[] = $rebroadcastNodeUrl;
3824 }
_rebroadcast($type)
This method rebroadcasts logout/pgtIou requests.
Definition: Client.php:3860

References CAS_Client\_rebroadcast().

+ Here is the call graph for this function:

◆ getURL()

CAS_Client::getURL ( )

This method returns the URL of the current request (without any ticket CGI parameter).

Returns
The URL

Definition at line 3524 of file Client.php.

3525 {
3527 // the URL is built when needed only
3528 if ( empty($this->_url) ) {
3529 $final_uri = '';
3530 // remove the ticket if present in the URL
3531 $final_uri = ($this->_isHttps()) ? 'https' : 'http';
3532 $final_uri .= '://';
3533
3534 $final_uri .= $this->_getClientUrl();
3535 $request_uri = explode('?', $_SERVER['REQUEST_URI'], 2);
3536 $final_uri .= $request_uri[0];
3537
3538 if (isset($request_uri[1]) && $request_uri[1]) {
3539 $query_string= $this->_removeParameterFromQueryString('ticket', $request_uri[1]);
3540
3541 // If the query string still has anything left,
3542 // append it to the final URI
3543 if ($query_string !== '') {
3544 $final_uri .= "?$query_string";
3545 }
3546 }
3547
3548 phpCAS::trace("Final URI: $final_uri");
3549 $this->setURL($final_uri);
3550 }
3551 phpCAS::traceEnd($this->_url);
3552 return $this->_url;
3553 }
setURL($url)
This method sets the URL of the current request.
Definition: Client.php:3509
_removeParameterFromQueryString($parameterName, $queryString)
Removes a parameter from a query string.
Definition: Client.php:3643
$_url
the URL of the current request (without any ticket CGI parameter).
Definition: Client.php:3499
_getClientUrl()
Try to figure out the phpCas client URL with possible Proxys / Ports etc.
Definition: Client.php:3577

References $_SERVER, CAS_Client\$_url, CAS_Client\_getClientUrl(), CAS_Client\_isHttps(), CAS_Client\_removeParameterFromQueryString(), CAS_Client\setURL(), phpCAS\trace(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Referenced by CAS_Client\_authError(), CAS_Client\getServerLoginURL(), CAS_Client\getServerProxyValidateURL(), CAS_Client\getServerSamlValidateURL(), CAS_Client\getServerServiceValidateURL(), and CAS_Client\isAuthenticated().

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

◆ setBaseURL()

CAS_Client::setBaseURL (   $url)

This method sets the base URL of the CAS server.

Parameters
string$urlthe base URL
Returns
string base url

Definition at line 3562 of file Client.php.

3563 {
3564 // Argument Validation
3565 if (gettype($url) != 'string')
3566 throw new CAS_TypeMismatchException($url, '$url', 'string');
3567
3568 return $this->_server['base_url'] = $url;
3569 }

References $url.

◆ setURL()

CAS_Client::setURL (   $url)

This method sets the URL of the current request.

Parameters
string$urlurl to set for service
Returns
void

Definition at line 3509 of file Client.php.

3510 {
3511 // Argument Validation
3512 if (gettype($url) != 'string')
3513 throw new CAS_TypeMismatchException($url, '$url', 'string');
3514
3515 $this->_url = $url;
3516 }

References $url.

Referenced by CAS_Client\getURL().

+ Here is the caller graph for this function:

Variable Documentation

◆ $_rebroadcast

CAS_Client::$_rebroadcast = false
private

Boolean of whether to rebroadcast pgtIou/pgtId and logoutRequest, and array of the nodes.

Definition at line 3779 of file Client.php.

◆ $_rebroadcast_headers

CAS_Client::$_rebroadcast_headers = array()
private

An array to store extra rebroadcast curl options.

Definition at line 3829 of file Client.php.

◆ $_rebroadcast_nodes

CAS_Client::$_rebroadcast_nodes = array()
private

Definition at line 3780 of file Client.php.

Referenced by CAS_Client\_rebroadcast().

◆ $_url

CAS_Client::$_url
private

the URL of the current request (without any ticket CGI parameter).

Written and read by CAS_Client::getURL().

Definition at line 3499 of file Client.php.

Referenced by CAS_Client\getURL().

◆ HOSTNAME

const CAS_Client::HOSTNAME = 0

Constants used for determining rebroadcast node type.

Definition at line 3785 of file Client.php.

Referenced by CAS_Client\_getNodeType().

◆ IP

const CAS_Client::IP = 1

Definition at line 3786 of file Client.php.

Referenced by CAS_Client\_getNodeType(), and CAS_Client\_rebroadcast().

◆ LOGOUT

const CAS_Client::LOGOUT = 0

Constants used for determining rebroadcast type (logout or pgtIou/pgtId).

Definition at line 3850 of file Client.php.

◆ PGTIOU

const CAS_Client::PGTIOU = 1

Definition at line 3851 of file Client.php.