phpCAS  version 1.4.0
Functions | Variables
Access to external services

Functions

static phpCAS::getProxiedService ($type)
 
static phpCAS::initializeProxiedService (CAS_ProxiedService $proxiedService)
 
static phpCAS::serviceWeb ($url, & $err_code, & $output)
 
static phpCAS::serviceMail ($url, $service, $flags, & $err_code, & $err_msg, & $pt)
 

Variables

const PHPCAS_SERVICE_OK 0
 
const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE 1
 
const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE 2
 
const PHPCAS_SERVICE_PT_FAILURE 3
 
const PHPCAS_SERVICE_NOT_AVAILABLE 4
 
const PHPCAS_PROXIED_SERVICE_HTTP_GET 'CAS_ProxiedService_Http_Get'
 
const PHPCAS_PROXIED_SERVICE_HTTP_POST 'CAS_ProxiedService_Http_Post'
 
const PHPCAS_PROXIED_SERVICE_IMAP 'CAS_ProxiedService_Imap'
 

Detailed Description

Function Documentation

◆ getProxiedService()

static phpCAS::getProxiedService (   $type)
static

Answer a proxy-authenticated service handler.

Parameters
string$typeThe service type. One of PHPCAS_PROXIED_SERVICE_HTTP_GET; PHPCAS_PROXIED_SERVICE_HTTP_POST; PHPCAS_PROXIED_SERVICE_IMAP
Returns
CAS_ProxiedService
Exceptions
InvalidArgumentExceptionIf the service type is unknown.

Definition at line 916 of file CAS.php.

References phpCAS\_validateProxyExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

◆ initializeProxiedService()

static phpCAS::initializeProxiedService ( CAS_ProxiedService  $proxiedService)
static

Initialize a proxied-service handler with the proxy-ticket it should use.

Parameters
CAS_ProxiedService$proxiedServiceProxied Service Handler
Returns
void
Exceptions
CAS_ProxyTicketExceptionIf there is a proxy-ticket failure. The code of the Exception will be one of: PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE PHPCAS_SERVICE_PT_FAILURE

Definition at line 943 of file CAS.php.

References phpCAS\_validateProxyExists(), and phpCAS\error().

Referenced by CAS_ProxiedService_Abstract\initializeProxyTicket().

◆ serviceMail()

static phpCAS::serviceMail (   $url,
  $service,
  $flags,
$err_code,
$err_msg,
$pt 
)
static

This method is used to access an IMAP/POP3/NNTP service.

Parameters
string$urla string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open().
string$servicea string giving for CAS retrieve Proxy ticket
string$flagsoptions given to imap_open().
int&$err_codean error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT_AVAILABLE.
string&$err_msgan error message on failure
string&$ptthe Proxy Ticket (PT) retrieved from the CAS server to access the URL on success, false on error).
Returns
object|false IMAP stream on success, false otherwise (in this later case, $err_code gives the reason why it failed and $err_msg contains an error message).

Definition at line 1003 of file CAS.php.

References phpCAS\_validateProxyExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

◆ serviceWeb()

static phpCAS::serviceWeb (   $url,
$err_code,
$output 
)
static

This method is used to access an HTTP[S] service.

Parameters
string$urlthe service to access.
int&$err_codean error code Possible values are PHPCAS_SERVICE_OK (on success), PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE, PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE, PHPCAS_SERVICE_PT_FAILURE, PHPCAS_SERVICE_NOT_AVAILABLE.
string&$outputthe output of the service (also used to give an error message on failure).
Returns
bool true on success, false otherwise (in this later case, $err_code gives the reason why it failed and $output contains an error message).

Definition at line 969 of file CAS.php.

References phpCAS\_validateProxyExists(), phpCAS\error(), phpCAS\traceBegin(), and phpCAS\traceEnd().

Variable Documentation

◆ PHPCAS_PROXIED_SERVICE_HTTP_GET

const PHPCAS_PROXIED_SERVICE_HTTP_GET 'CAS_ProxiedService_Http_Get'

phpCAS::getProxiedService() type for HTTP GET

Definition at line 195 of file CAS.php.

Referenced by CAS_Client\getProxiedService(), and CAS_Client\serviceWeb().

◆ PHPCAS_PROXIED_SERVICE_HTTP_POST

const PHPCAS_PROXIED_SERVICE_HTTP_POST 'CAS_ProxiedService_Http_Post'

phpCAS::getProxiedService() type for HTTP POST

Definition at line 199 of file CAS.php.

Referenced by CAS_Client\getProxiedService().

◆ PHPCAS_PROXIED_SERVICE_IMAP

const PHPCAS_PROXIED_SERVICE_IMAP 'CAS_ProxiedService_Imap'

phpCAS::getProxiedService() type for IMAP

Definition at line 203 of file CAS.php.

Referenced by CAS_Client\getProxiedService(), and CAS_Client\serviceMail().

◆ PHPCAS_SERVICE_NOT_AVAILABLE

const PHPCAS_SERVICE_NOT_AVAILABLE 4

phpCAS::service() error code when the service was not available.

Definition at line 187 of file CAS.php.

Referenced by CAS_Client\serviceMail(), and CAS_Client\serviceWeb().

◆ PHPCAS_SERVICE_OK

const PHPCAS_SERVICE_OK 0

phpCAS::service() error code on success

Definition at line 168 of file CAS.php.

Referenced by CAS_Client\serviceMail(), and CAS_Client\serviceWeb().

◆ PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE

const PHPCAS_SERVICE_PT_BAD_SERVER_RESPONSE 2

phpCAS::service() error code when the PT could not retrieve because the response of the CAS server was ill-formed.

Definition at line 178 of file CAS.php.

Referenced by CAS_ProxyTicketException\__construct().

◆ PHPCAS_SERVICE_PT_FAILURE

const PHPCAS_SERVICE_PT_FAILURE 3

phpCAS::service() error code when the PT could not retrieve because the CAS server did not want to.

Definition at line 183 of file CAS.php.

Referenced by CAS_ProxyTicketException\__construct().

◆ PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE

const PHPCAS_SERVICE_PT_NO_SERVER_RESPONSE 1

phpCAS::service() error code when the PT could not retrieve because the CAS server did not respond.

Definition at line 173 of file CAS.php.

Referenced by CAS_ProxyTicketException\__construct().