phpCAS version 1.3.6

Functions | Variables
CAS Basic client features (CAS 1.0, Service Tickets)
Implementation

## 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
| 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 1870 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 1892 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 | $cert | the PEM certificate file name of the CA that emited the cert of the server
  bool | $validate_cn | valiate CN of the CAS server certificate

Returns
  void

Definition at line 1944 of file Client.php.

## ◆ setNoCasServerValidation()

CAS_Client::setNoCasServerValidation | ( |  | ) |

Set no SSL validation for the CAS server.

Returns
  void

Definition at line 1965 of file Client.php.

## ◆ setTicket()

CAS_Client::setTicket | ( |  | $st | ) |

This method stores the Service Ticket.

Parameters

  string | $st | The Service Ticket.

Returns
  void

Definition at line 1882 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_url | reference to the the URL of the request to the CAS server.
  string | &$text_response | reference to the response of the CAS server, as is (XML text).
  string | &$tree_response | reference to the response of the CAS server, as a DOM XML tree.
  bool | $renew | true to force the authentication with the CAS server

Returns
  bool true when successfull and issue a CAS_AuthenticationException and false on an error

Definition at line 1985 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
| private

the certificate of the CAS server CA.

Definition at line 1912 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 1925 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 1932 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 1863 of file Client.php.

Referenced by CAS_Client\getTicket().