Functions

Proxy other services
[CAS Proxy features (CAS 2.0, Proxy Granting Tickets)]

Functions

 CAS_Client::getProxiedService ($type)
 CAS_Client::initializeProxiedService (CAS_ProxiedService $proxiedService)
 CAS_Client::serviceWeb ($url, &$err_code, &$output)
 CAS_Client::serviceMail ($url, $serviceUrl, $flags, &$err_code, &$err_msg, &$pt)

Function Documentation

CAS_Client::getProxiedService ( type  )  [inherited]

Answer a proxy-authenticated service handler.

Parameters:
string $type The service type. One of: PHPCAS_PROXIED_SERVICE_HTTP_GET PHPCAS_PROXIED_SERVICE_HTTP_POST PHPCAS_PROXIED_SERVICE_IMAP
Returns:
CAS_ProxiedService
Exceptions:
InvalidArgumentException If the service type is unknown.

Definition at line 2359 of file Client.php.

CAS_Client::initializeProxiedService ( CAS_ProxiedService proxiedService  )  [inherited]

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

Parameters:
CAS_ProxiedService $proxiedService
Returns:
void
Exceptions:
CAS_ProxyTicketException If 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
CAS_ProxiedService_Exception If there is a failure getting the url from the proxied service.

Definition at line 2394 of file Client.php.

References CAS_ProxiedService::getServiceUrl(), and CAS_ProxiedService::setProxyTicket().

CAS_Client::serviceMail ( url,
serviceUrl,
flags,
&$  err_code,
&$  err_msg,
&$  pt 
) [inherited]

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

Parameters:
$url a string giving the URL of the service, including the mailing box for IMAP URLs, as accepted by imap_open().
$service a string giving for CAS retrieve Proxy ticket
$flags options given to imap_open().
$err_code an 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.
$err_msg an error message on failure
$pt the Proxy Ticket (PT) retrieved from the CAS server to access the URL on success, FALSE on error).
Returns:
an 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 2455 of file Client.php.

References $serviceUrl.

CAS_Client::serviceWeb ( url,
&$  err_code,
&$  output 
) [inherited]

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

Parameters:
$url the service to access.
$err_code an 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.
$output the output of the service (also used to give an error message on failure).
Returns:
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 2418 of file Client.php.