Öffentliche Methoden | |
Auth_OpenID_ServiceEndpoint () | |
getDisplayIdentifier () | |
usesExtension ($extension_uri) | |
preferredNamespace () | |
matchTypes ($type_uris) | |
supportsType ($type_uri) | |
compatibilityMode () | |
isOPIdentifier () | |
fromOPEndpointURL ($op_endpoint_url) | |
parseService ($yadis_url, $uri, $type_uris, $service_element) | |
getLocalID () | |
fromXRDS ($uri, $xrds_text) | |
fromDiscoveryResult ($discoveryResult) | |
fromHTML ($uri, $html) | |
copy () |
Definiert in Zeile 37 der Datei Discover.php.
Definiert in Zeile 38 der Datei Discover.php.
00038 { 00039 function Auth_OpenID_ServiceEndpoint() 00040 { 00041 $this->claimed_id = null; 00042 $this->server_url = null; 00043 $this->type_uris = array(); 00044 $this->local_id = null; 00045 $this->canonicalID = null; 00046 $this->used_yadis = false; // whether this came from an XRDS 00047 $this->display_identifier = null;
compatibilityMode | ( | ) |
Definiert in Zeile 116 der Datei Discover.php.
00118 { 00119 return $this->preferredNamespace() != Auth_OpenID_OPENID2_NS;
copy | ( | ) |
Definiert in Zeile 247 der Datei Discover.php.
00249 { 00250 $x = new Auth_OpenID_ServiceEndpoint(); 00251 00252 $x->claimed_id = $this->claimed_id; 00253 $x->server_url = $this->server_url; 00254 $x->type_uris = $this->type_uris; 00255 $x->local_id = $this->local_id; 00256 $x->canonicalID = $this->canonicalID; 00257 $x->used_yadis = $this->used_yadis; 00258 00259 return $x;
fromDiscoveryResult | ( | $ | discoveryResult | ) |
Definiert in Zeile 199 der Datei Discover.php.
00201 { 00202 if ($discoveryResult->isXRDS()) { 00203 return Auth_OpenID_ServiceEndpoint::fromXRDS( 00204 $discoveryResult->normalized_uri, 00205 $discoveryResult->response_text); 00206 } else { 00207 return Auth_OpenID_ServiceEndpoint::fromHTML( 00208 $discoveryResult->normalized_uri, 00209 $discoveryResult->response_text); 00210 }
fromHTML | ( | $ | uri, | |
$ | html | |||
) |
Definiert in Zeile 212 der Datei Discover.php.
00214 { 00215 $discovery_types = array( 00216 array(Auth_OpenID_TYPE_2_0, 00217 'openid2.provider', 'openid2.local_id'), 00218 array(Auth_OpenID_TYPE_1_1, 00219 'openid.server', 'openid.delegate') 00220 ); 00221 00222 $services = array(); 00223 00224 foreach ($discovery_types as $triple) { 00225 list($type_uri, $server_rel, $delegate_rel) = $triple; 00226 00227 $urls = Auth_OpenID_legacy_discover($html, $server_rel, 00228 $delegate_rel); 00229 00230 if ($urls === false) { 00231 continue; 00232 } 00233 00234 list($delegate_url, $server_url) = $urls; 00235 00236 $service = new Auth_OpenID_ServiceEndpoint(); 00237 $service->claimed_id = $uri; 00238 $service->local_id = $delegate_url; 00239 $service->server_url = $server_url; 00240 $service->type_uris = array($type_uri); 00241 00242 $services[] = $service; 00243 } 00244 00245 return $services;
fromOPEndpointURL | ( | $ | op_endpoint_url | ) |
Definiert in Zeile 126 der Datei Discover.php.
00128 { 00129 // Construct an OP-Identifier OpenIDServiceEndpoint object for 00130 // a given OP Endpoint URL 00131 $obj = new Auth_OpenID_ServiceEndpoint(); 00132 $obj->server_url = $op_endpoint_url; 00133 $obj->type_uris = array(Auth_OpenID_TYPE_2_0_IDP); 00134 return $obj;
fromXRDS | ( | $ | uri, | |
$ | xrds_text | |||
) |
Definiert in Zeile 179 der Datei Discover.php.
00181 { 00182 $xrds =& Auth_Yadis_XRDS::parseXRDS($xrds_text); 00183 00184 if ($xrds) { 00185 $yadis_services = 00186 $xrds->services(array('filter_MatchesAnyOpenIDType')); 00187 return Auth_OpenID_makeOpenIDEndpoints($uri, $yadis_services); 00188 } 00189 00190 return null;
getDisplayIdentifier | ( | ) |
Definiert in Zeile 49 der Datei Discover.php.
00051 { 00052 if ($this->display_identifier) { 00053 return $this->display_identifier; 00054 } 00055 if (! $this->claimed_id) { 00056 return $this->claimed_id; 00057 } 00058 $parsed = parse_url($this->claimed_id); 00059 $scheme = $parsed['scheme']; 00060 $host = $parsed['host']; 00061 $path = $parsed['path']; 00062 if (array_key_exists('query', $parsed)) { 00063 $query = $parsed['query']; 00064 $no_frag = "$scheme://$host$path?$query"; 00065 } else { 00066 $no_frag = "$scheme://$host$path"; 00067 } 00068 return $no_frag;
getLocalID | ( | ) |
Definiert in Zeile 158 der Datei Discover.php.
00160 { 00161 // Return the identifier that should be sent as the 00162 // openid.identity_url parameter to the server. 00163 if ($this->local_id === null && $this->canonicalID === null) { 00164 return $this->claimed_id; 00165 } else { 00166 if ($this->local_id) { 00167 return $this->local_id; 00168 } else { 00169 return $this->canonicalID; 00170 } 00171 }
isOPIdentifier | ( | ) |
Definiert in Zeile 121 der Datei Discover.php.
00123 { 00124 return in_array(Auth_OpenID_TYPE_2_0_IDP, $this->type_uris);
matchTypes | ( | $ | type_uris | ) |
Definiert in Zeile 96 der Datei Discover.php.
00098 { 00099 $result = array(); 00100 foreach ($type_uris as $test_uri) { 00101 if ($this->supportsType($test_uri)) { 00102 $result[] = $test_uri; 00103 } 00104 } 00105 00106 return $result;
parseService | ( | $ | yadis_url, | |
$ | uri, | |||
$ | type_uris, | |||
$ | service_element | |||
) |
Definiert in Zeile 136 der Datei Discover.php.
00138 { 00139 // Set the state of this object based on the contents of the 00140 // service element. Return true if successful, false if not 00141 // (if findOPLocalIdentifier returns false). 00142 $this->type_uris = $type_uris; 00143 $this->server_url = $uri; 00144 $this->used_yadis = true; 00145 00146 if (!$this->isOPIdentifier()) { 00147 $this->claimed_id = $yadis_url; 00148 $this->local_id = Auth_OpenID_findOPLocalIdentifier( 00149 $service_element, 00150 $this->type_uris); 00151 if ($this->local_id === false) { 00152 return false; 00153 } 00154 } 00155 00156 return true;
preferredNamespace | ( | ) |
Definiert in Zeile 75 der Datei Discover.php.
00077 { 00078 if (in_array(Auth_OpenID_TYPE_2_0_IDP, $this->type_uris) || 00079 in_array(Auth_OpenID_TYPE_2_0, $this->type_uris)) { 00080 return Auth_OpenID_OPENID2_NS; 00081 } else { 00082 return Auth_OpenID_OPENID1_NS; 00083 }
supportsType | ( | $ | type_uri | ) |
Definiert in Zeile 108 der Datei Discover.php.
00110 { 00111 // Does this endpoint support this type? 00112 return ((in_array($type_uri, $this->type_uris)) || 00113 (($type_uri == Auth_OpenID_TYPE_2_0) && 00114 $this->isOPIdentifier()));
usesExtension | ( | $ | extension_uri | ) |
Copyright © 2003 - 2009 MyOOS [Shopsystem]. All rights reserved. MyOOS [Shopsystem] is Free Software released under the GNU/GPL License. Webmaster: info@r23.de (Impressum) |
|