phpCAS  version 1.3.6
Functions

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)
 

Detailed Description

Function Documentation

◆ getProxiedService()

CAS_Client::getProxiedService (   $type)

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 2882 of file Client.php.

References CAS_Client\$_requestImplementation, CAS_Client\_getUser(), CAS_Client\ensureAuthenticationCallSuccessful(), CAS_Client\ensureIsProxy(), PHPCAS_PROXIED_SERVICE_HTTP_GET, PHPCAS_PROXIED_SERVICE_HTTP_POST, and PHPCAS_PROXIED_SERVICE_IMAP.

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

◆ initializeProxiedService()

CAS_Client::initializeProxiedService ( CAS_ProxiedService  $proxiedService)

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

Parameters
CAS_ProxiedService$proxiedServiceservice 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
CAS_ProxiedService_ExceptionIf there is a failure getting the url from the proxied service.

Definition at line 2933 of file Client.php.

References CAS_Client\ensureAuthenticationCallSuccessful(), CAS_Client\ensureIsProxy(), CAS_ProxiedService\getServiceUrl(), CAS_Client\retrievePT(), and CAS_ProxiedService\setProxyTicket().

◆ serviceMail()

CAS_Client::serviceMail (   $url,
  $serviceUrl,
  $flags,
$err_code,
$err_msg,
$pt 
)

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$serviceUrla 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 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 3018 of file Client.php.

References $serviceUrl, CAS_Client\ensureAuthenticationCallSuccessful(), CAS_Client\ensureIsProxy(), CAS_Client\getLangObj(), CAS_Client\getProxiedService(), PHPCAS_PROXIED_SERVICE_IMAP, PHPCAS_SERVICE_NOT_AVAILABLE, and PHPCAS_SERVICE_OK.

◆ serviceWeb()

CAS_Client::serviceWeb (   $url,
$err_code,
$output 
)

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
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 2968 of file Client.php.

References CAS_Client\ensureAuthenticationCallSuccessful(), CAS_Client\ensureIsProxy(), CAS_Client\getLangObj(), CAS_Client\getProxiedService(), PHPCAS_PROXIED_SERVICE_HTTP_GET, PHPCAS_SERVICE_NOT_AVAILABLE, and PHPCAS_SERVICE_OK.