|
phpCAS
version 1.4.0
|
Public Member Functions | |
| __construct (CAS_Request_RequestInterface $requestHandler, CAS_CookieJar $cookieJar) | |
| getServiceUrl () | |
| setUrl ($url) | |
| send () | |
| getResponseHeaders () | |
| getResponseStatusCode () | |
| getResponseBody () | |
| getCookies () | |
Public Member Functions inherited from CAS_ProxiedService_Abstract | |
| setProxyTicket ($proxyTicket) | |
| setCasClient (CAS_Client $casClient) | |
Public Member Functions inherited from CAS_ProxiedService | |
| getServiceUrl () | |
| setProxyTicket ($proxyTicket) | |
Public Member Functions inherited from CAS_ProxiedService_Http | |
| setUrl ($url) | |
| send () | |
| getResponseHeaders () | |
| getResponseBody () | |
Protected Member Functions | |
| makeRequest ($url) | |
| populateRequest (CAS_Request_RequestInterface $request) | |
| getRedirectUrl (array $responseHeaders) | |
| hasBeenSent () | |
Protected Member Functions inherited from CAS_ProxiedService_Abstract | |
| getProxyTicket () | |
| initializeProxyTicket () | |
Protected Attributes | |
| $requestHandler | |
Private Attributes | |
| $_cookieJar | |
| $_url | |
| $_numRequests = 0 | |
| $_responseHeaders = array() | |
| $_responseStatusCode = '' | |
| $_responseBody = '' | |
This class implements common methods for ProxiedService implementations included with phpCAS.
Definition at line 41 of file Abstract.php.
| CAS_ProxiedService_Http_Abstract::__construct | ( | CAS_Request_RequestInterface | $requestHandler, |
| CAS_CookieJar | $cookieJar | ||
| ) |
Constructor.
| CAS_Request_RequestInterface | $requestHandler | request handler object |
| CAS_CookieJar | $cookieJar | cookieJar object |
Definition at line 66 of file Abstract.php.
References $requestHandler.
| CAS_ProxiedService_Http_Abstract::getCookies | ( | ) |
Answer the cookies from the response. This may include cookies set during redirect responses.
Definition at line 354 of file Abstract.php.
|
protected |
Answer a redirect URL if a redirect header is found, otherwise null.
| array | $responseHeaders | response header to extract a redirect from |
Definition at line 271 of file Abstract.php.
| CAS_ProxiedService_Http_Abstract::getResponseBody | ( | ) |
Answer the body of response.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 337 of file Abstract.php.
| CAS_ProxiedService_Http_Abstract::getResponseHeaders | ( | ) |
Answer the headers of the response.
| CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 303 of file Abstract.php.
| CAS_ProxiedService_Http_Abstract::getResponseStatusCode | ( | ) |
Answer HTTP status code of the response
| CAS_OutOfSequenceException | If called before the Request has been sent. |
Definition at line 320 of file Abstract.php.
| CAS_ProxiedService_Http_Abstract::getServiceUrl | ( | ) |
Answer a service identifier (URL) for whom we should fetch a proxy ticket.
| Exception | If no service url is available. |
Definition at line 85 of file Abstract.php.
References $_url.
Referenced by send().
|
protected |
Answer true if our request has been sent yet.
Definition at line 292 of file Abstract.php.
Referenced by send(), CAS_ProxiedService_Http_Post\setBody(), CAS_ProxiedService_Http_Post\setContentType(), and setUrl().
|
protected |
Build and perform a request, following redirects
| string | $url | url for the request |
| 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 sending the request to the target service. |
Definition at line 208 of file Abstract.php.
References $requestHandler, populateRequest(), and phpCAS\trace().
Referenced by send().
|
abstractprotected |
Add any other parts of the request needed by concrete classes
| CAS_Request_RequestInterface | $request | request interface object |
Referenced by makeRequest().
| CAS_ProxiedService_Http_Abstract::send | ( | ) |
Perform the request.
| CAS_OutOfSequenceException | If called multiple times. |
| 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 sending the request to the target service. |
Definition at line 139 of file Abstract.php.
References CAS_ProxiedService_Abstract\getProxyTicket(), getServiceUrl(), hasBeenSent(), CAS_ProxiedService_Abstract\initializeProxyTicket(), makeRequest(), phpCAS\traceBegin(), and phpCAS\traceEnd().
| CAS_ProxiedService_Http_Abstract::setUrl | ( | $url | ) |
Set the URL of the Request
| string | $url | url to set |
| CAS_OutOfSequenceException | If called after the Request has been sent. |
Definition at line 108 of file Abstract.php.
References hasBeenSent().
|
private |
The storage mechanism for cookies set by the target service.
Definition at line 56 of file Abstract.php.
|
private |
Indicator of the number of requests (including redirects performed.
Definition at line 171 of file Abstract.php.
|
private |
The response headers.
Definition at line 192 of file Abstract.php.
|
private |
The response headers.
Definition at line 178 of file Abstract.php.
|
private |
The response status code.
Definition at line 185 of file Abstract.php.
|
private |
|
protected |
The HTTP request mechanism talking to the target service.
Definition at line 49 of file Abstract.php.
Referenced by __construct(), and makeRequest().
1.8.13