19require_once
"Auth/OpenID.php";
21define(
'Auth_OpenID_FETCHER_MAX_RESPONSE_KB', 1024);
22define(
'Auth_OpenID_USER_AGENT',
27 $headers =
null, $body =
null)
29 $this->final_url = $final_url;
30 $this->status = $status;
31 $this->headers = $headers;
92 trigger_error(
"not implemented", E_USER_ERROR);
102 return (
bool)preg_match(
'/^https:\/\//i',
$url);
112 return (
bool)preg_match(
'/^https?:\/\//i',
$url);
120 foreach ($headers as $line) {
121 if (strpos(strtolower($line),
"location: ") === 0) {
122 $parts = explode(
" ", $line, 2);
124 $ppos = strpos($loc,
"://");
125 if ($ppos ===
false || $ppos > strpos($loc,
"/")) {
127 $hpos = strpos(
$url,
"://");
128 $prt = substr(
$url, 0, $hpos+3);
130 if (substr($loc, 0, 1) ==
"/") {
132 $fspos = strpos(
$url,
"/");
133 if ($fspos) $loc = $prt.substr(
$url, 0, $fspos).$loc;
134 else $loc = $prt.$url.$loc;
139 $xpos = strpos(
$url,
"/");
140 if ($xpos ===
false)
break;
141 $apos = strpos(
$url,
"?");
142 if ($apos !==
false && $apos < $xpos)
break;
143 $apos = strpos(
$url,
"&");
144 if ($apos !==
false && $apos < $xpos)
break;
145 $pp .= substr(
$url, 0, $xpos+1);
169 function get(
$url, $headers =
null)
171 trigger_error(
"not implemented", E_USER_ERROR);
const Auth_OpenID_VERSION
The library version string.
static log($format_string)
Wrap PHP's standard error_log functionality.
supportsSSL()
Does this fetcher implementation (and runtime) support fetching HTTPS URLs? May inspect the runtime e...
allowedURL($url)
Return whether a URL should be allowed.
isHTTPS($url)
Is this an https URL?
canFetchURL($url)
Return whether a URL can be fetched.
URLHasAllowedScheme($url)
Is this an http or https URL?
_findRedirect($headers, $url)
@access private
Auth_Yadis_HTTPResponse($final_url=null, $status=null, $headers=null, $body=null)