phpCAS
version 1.4.0
|
Public Member Functions | |
__construct (array &$storageArray) | |
storeCookies ($request_url, $response_headers) | |
getCookies ($request_url) | |
Protected Member Functions | |
parseCookieHeaders ( $header, $defaultDomain) | |
parseCookieHeader ($line, $defaultDomain) | |
storeCookie ($cookie) | |
discardCookie ($cookie) | |
expireCookies () | |
cookieMatchesTarget ($cookie, $target) | |
Private Attributes | |
$_cookies | |
This class provides access to service cookies and handles parsing of response headers to pull out cookie values.
Definition at line 41 of file CookieJar.php.
CAS_CookieJar::__construct | ( | array & | $storageArray | ) |
Create a new cookie jar by passing it a reference to an array in which it should store cookies.
array | &$storageArray | Array to store cookies |
Definition at line 54 of file CookieJar.php.
|
protected |
Answer true if cookie is applicable to a target.
array | $cookie | An array of cookie attributes. |
array | false | $target | An array of URL attributes as generated by parse_url(). |
private
Definition at line 317 of file CookieJar.php.
Referenced by getCookies(), and storeCookies().
|
protected |
Discard an existing cookie
array | $cookie | An cookie |
protected
Definition at line 272 of file CookieJar.php.
Referenced by storeCookie().
|
protected |
Go through our stored cookies and remove any that are expired.
protected
Definition at line 298 of file CookieJar.php.
Referenced by getCookies().
CAS_CookieJar::getCookies | ( | $request_url | ) |
Retrieve cookies applicable for a web service request. Cookie applicability is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
string | $request_url | The url that the cookies will be for. |
private
Definition at line 101 of file CookieJar.php.
References cookieMatchesTarget(), and expireCookies().
|
protected |
Parse a single cookie header line.
Based on RFC2965 http://www.ietf.org/rfc/rfc2965.txt
string | $line | The header line. |
string | $defaultDomain | The domain to use if none is specified in the cookie. |
Definition at line 160 of file CookieJar.php.
References phpCAS\trace().
Referenced by parseCookieHeaders().
|
protected |
Parse Cookies without PECL From the comments in http://php.net/manual/en/function.http-parse-cookie.php
array | $header | array of header lines. |
string | $defaultDomain | The domain to use if none is specified in the cookie. |
Definition at line 135 of file CookieJar.php.
References parseCookieHeader(), phpCAS\traceBegin(), and phpCAS\traceEnd().
Referenced by storeCookies().
|
protected |
Add, update, or remove a cookie.
array | $cookie | A cookie array as created by parseCookieHeaders() |
protected
Definition at line 255 of file CookieJar.php.
References discardCookie().
Referenced by storeCookies().
CAS_CookieJar::storeCookies | ( | $request_url, | |
$response_headers | |||
) |
Store cookies for a web service request. Cookie storage is based on RFC 2965: http://www.ietf.org/rfc/rfc2965.txt
string | $request_url | The URL that generated the response headers. |
array | $response_headers | An array of the HTTP response header strings. |
private
Definition at line 70 of file CookieJar.php.
References cookieMatchesTarget(), parseCookieHeaders(), storeCookie(), and phpCAS\trace().
|
private |
Definition at line 44 of file CookieJar.php.