phpCAS  version 1.4.0
Functions | Variables
CAS Basic client features (CAS 1.0, Service Tickets)

Functions

 CAS_Client::getTicket ()
 
 CAS_Client::setTicket ($st)
 
 CAS_Client::hasTicket ()
 
 CAS_Client::setCasServerCACert ($cert, $validate_cn)
 
 CAS_Client::setNoCasServerValidation ()
 
 CAS_Client::validateCAS10 (&$validate_url, &$text_response, &$tree_response, $renew=false)
 

Variables

 CAS_Client::$_ticket
 
 CAS_Client::$_cas_server_ca_cert = null
 
 CAS_Client::$_cas_server_cn_validate
 
 CAS_Client::$_no_cas_server_validation
 

Detailed Description

Function Documentation

◆ getTicket()

CAS_Client::getTicket ( )

This method returns the Service Ticket provided in the URL of the request.

Returns
string service ticket.

Definition at line 2034 of file Client.php.

References CAS_Client\$_ticket.

Referenced by CAS_Client\_buildSAMLPayload(), CAS_Client\isAuthenticated(), CAS_Client\validateCAS10(), CAS_Client\validateCAS20(), and CAS_Client\validateSA().

◆ hasTicket()

CAS_Client::hasTicket ( )

This method tells if a Service Ticket was stored.

Returns
bool if a Service Ticket has been stored.

Definition at line 2056 of file Client.php.

Referenced by CAS_Client\isAuthenticated().

◆ setCasServerCACert()

CAS_Client::setCasServerCACert (   $cert,
  $validate_cn 
)

Set the CA certificate of the CAS server.

Parameters
string$certthe PEM certificate file name of the CA that emited the cert of the server
bool$validate_cnvaliate CN of the CAS server certificate
Returns
void

Definition at line 2108 of file Client.php.

◆ setNoCasServerValidation()

CAS_Client::setNoCasServerValidation ( )

Set no SSL validation for the CAS server.

Returns
void

Definition at line 2129 of file Client.php.

◆ setTicket()

CAS_Client::setTicket (   $st)

This method stores the Service Ticket.

Parameters
string$stThe Service Ticket.
Returns
void

Definition at line 2046 of file Client.php.

Referenced by CAS_Client\_wasPreviouslyAuthenticated().

◆ validateCAS10()

CAS_Client::validateCAS10 ( $validate_url,
$text_response,
$tree_response,
  $renew = false 
)

This method is used to validate a CAS 1,0 ticket; halt on failure, and sets $validate_url, $text_reponse and $tree_response on success.

Parameters
string&$validate_urlreference to the the URL of the request to the CAS server.
string&$text_responsereference to the response of the CAS server, as is (XML text).
string&$tree_responsereference to the response of the CAS server, as a DOM XML tree.
bool$renewtrue to force the authentication with the CAS server
Returns
bool true when successfull and issue a CAS_AuthenticationException and false on an error
Exceptions
CAS_AuthenticationException

Definition at line 2150 of file Client.php.

References CAS_Client\_readURL(), CAS_Client\getServerServiceValidateURL(), CAS_Client\getTicket(), phpCAS\trace(), and phpCAS\traceBegin().

Variable Documentation

◆ $_cas_server_ca_cert

CAS_Client::$_cas_server_ca_cert = null
private

Definition at line 2076 of file Client.php.

◆ $_cas_server_cn_validate

CAS_Client::$_cas_server_cn_validate
private

validate CN of the CAS server certificate

Definition at line 2089 of file Client.php.

◆ $_no_cas_server_validation

CAS_Client::$_no_cas_server_validation
private

Set to true not to validate the CAS server.

Definition at line 2096 of file Client.php.

◆ $_ticket

CAS_Client::$_ticket
private

The Ticket provided in the URL of the request if present (empty otherwise). Written by CAS_Client::CAS_Client(), read by CAS_Client::getTicket() and CAS_Client::_hasPGT().

Definition at line 2027 of file Client.php.

Referenced by CAS_Client\getTicket().