ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
Auth_OpenID_ServiceEndpoint Class Reference

Object representing an OpenID service endpoint. More...

+ Collaboration diagram for Auth_OpenID_ServiceEndpoint:

Public Member Functions

 Auth_OpenID_ServiceEndpoint ()
 getDisplayIdentifier ()
 usesExtension ($extension_uri)
 preferredNamespace ()
 matchTypes ($type_uris)
 supportsType ($type_uri)
 compatibilityMode ()
 isOPIdentifier ()
 parseService ($yadis_url, $uri, $type_uris, $service_element)
 getLocalID ()
 consumerFromXRDS ($uri, $xrds_text)
 copy ()

Static Public Member Functions

static fromOPEndpointURL ($op_endpoint_url)
static fromXRDS ($uri, $xrds_text)
static fromDiscoveryResult ($discoveryResult)
static fromHTML ($uri, $html)

Detailed Description

Object representing an OpenID service endpoint.

Definition at line 63 of file Discover.php.

Member Function Documentation

Auth_OpenID_ServiceEndpoint::Auth_OpenID_ServiceEndpoint ( )

Definition at line 64 of file Discover.php.

References Auth_OpenID_ServiceEndpoint().

Referenced by Auth_OpenID_ServiceEndpoint(), copy(), fromHTML(), and fromOPEndpointURL().

{
{
$this->claimed_id = null;
$this->server_url = null;
$this->type_uris = array();
$this->local_id = null;
$this->canonicalID = null;
$this->used_yadis = false; // whether this came from an XRDS
$this->display_identifier = null;

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServiceEndpoint::compatibilityMode ( )

Definition at line 142 of file Discover.php.

References Auth_OpenID_OPENID2_NS, and preferredNamespace().

+ Here is the call graph for this function:

Auth_OpenID_ServiceEndpoint::consumerFromXRDS (   $uri,
  $xrds_text 
)

Definition at line 205 of file Discover.php.

References Auth_OpenID_makeOpenIDEndpoints(), and Auth_Yadis_XRDS\parseXRDS().

{
$xrds =& Auth_Yadis_XRDS::parseXRDS($xrds_text);
if ($xrds) {
$yadis_services =
$xrds->services(array('filter_MatchesAnyOpenIDConsumerType'));
return Auth_OpenID_makeOpenIDEndpoints($uri, $yadis_services);
}
return null;

+ Here is the call graph for this function:

Auth_OpenID_ServiceEndpoint::copy ( )

Definition at line 292 of file Discover.php.

References Auth_OpenID_ServiceEndpoint().

{
$x->claimed_id = $this->claimed_id;
$x->server_url = $this->server_url;
$x->type_uris = $this->type_uris;
$x->local_id = $this->local_id;
$x->canonicalID = $this->canonicalID;
$x->used_yadis = $this->used_yadis;
return $x;

+ Here is the call graph for this function:

static Auth_OpenID_ServiceEndpoint::fromDiscoveryResult (   $discoveryResult)
static

Definition at line 244 of file Discover.php.

References fromHTML(), and fromXRDS().

{
if ($discoveryResult->isXRDS()) {
$discoveryResult->normalized_uri,
$discoveryResult->response_text);
} else {
$discoveryResult->normalized_uri,
$discoveryResult->response_text);
}

+ Here is the call graph for this function:

static Auth_OpenID_ServiceEndpoint::fromHTML (   $uri,
  $html 
)
static

Definition at line 257 of file Discover.php.

References Auth_OpenID_legacy_discover(), Auth_OpenID_ServiceEndpoint(), Auth_OpenID_TYPE_1_1, and Auth_OpenID_TYPE_2_0.

Referenced by Auth_OpenID_discoverWithoutYadis(), Auth_OpenID_discoverWithYadis(), and fromDiscoveryResult().

{
$discovery_types = array(
'openid2.provider', 'openid2.local_id'),
'openid.server', 'openid.delegate')
);
$services = array();
foreach ($discovery_types as $triple) {
list($type_uri, $server_rel, $delegate_rel) = $triple;
$urls = Auth_OpenID_legacy_discover($html, $server_rel,
$delegate_rel);
if ($urls === false) {
continue;
}
list($delegate_url, $server_url) = $urls;
$service = new Auth_OpenID_ServiceEndpoint();
$service->claimed_id = $uri;
$service->local_id = $delegate_url;
$service->server_url = $server_url;
$service->type_uris = array($type_uri);
$services[] = $service;
}
return $services;

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Auth_OpenID_ServiceEndpoint::fromOPEndpointURL (   $op_endpoint_url)
static

Definition at line 152 of file Discover.php.

References Auth_OpenID_ServiceEndpoint(), and Auth_OpenID_TYPE_2_0_IDP.

Referenced by Auth_OpenID_GenericConsumer\_verifyDiscoveryResultsOpenID2().

{
// Construct an OP-Identifier OpenIDServiceEndpoint object for
// a given OP Endpoint URL
$obj->server_url = $op_endpoint_url;
$obj->type_uris = array(Auth_OpenID_TYPE_2_0_IDP);
return $obj;

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static Auth_OpenID_ServiceEndpoint::fromXRDS (   $uri,
  $xrds_text 
)
static

Definition at line 224 of file Discover.php.

References Auth_OpenID_makeOpenIDEndpoints(), and Auth_Yadis_XRDS\parseXRDS().

Referenced by Auth_OpenID_discoverWithYadis(), and fromDiscoveryResult().

{
$xrds = Auth_Yadis_XRDS::parseXRDS($xrds_text);
if ($xrds) {
$yadis_services =
$xrds->services(array('filter_MatchesAnyOpenIDType'));
return Auth_OpenID_makeOpenIDEndpoints($uri, $yadis_services);
}
return null;

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServiceEndpoint::getDisplayIdentifier ( )

Definition at line 75 of file Discover.php.

References $path, and $query.

{
if ($this->display_identifier) {
return $this->display_identifier;
}
if (! $this->claimed_id) {
return $this->claimed_id;
}
$parsed = parse_url($this->claimed_id);
$scheme = $parsed['scheme'];
$host = $parsed['host'];
$path = $parsed['path'];
if (array_key_exists('query', $parsed)) {
$query = $parsed['query'];
$no_frag = "$scheme://$host$path?$query";
} else {
$no_frag = "$scheme://$host$path";
}
return $no_frag;
Auth_OpenID_ServiceEndpoint::getLocalID ( )

Definition at line 184 of file Discover.php.

{
// Return the identifier that should be sent as the
// openid.identity_url parameter to the server.
if ($this->local_id === null && $this->canonicalID === null) {
return $this->claimed_id;
} else {
if ($this->local_id) {
return $this->local_id;
} else {
return $this->canonicalID;
}
}
Auth_OpenID_ServiceEndpoint::isOPIdentifier ( )

Definition at line 147 of file Discover.php.

References Auth_OpenID_TYPE_2_0_IDP.

Referenced by parseService(), and supportsType().

{
return in_array(Auth_OpenID_TYPE_2_0_IDP, $this->type_uris);

+ Here is the caller graph for this function:

Auth_OpenID_ServiceEndpoint::matchTypes (   $type_uris)

Definition at line 122 of file Discover.php.

References $result, and supportsType().

{
$result = array();
foreach ($type_uris as $test_uri) {
if ($this->supportsType($test_uri)) {
$result[] = $test_uri;
}
}
return $result;

+ Here is the call graph for this function:

Auth_OpenID_ServiceEndpoint::parseService (   $yadis_url,
  $uri,
  $type_uris,
  $service_element 
)

Definition at line 162 of file Discover.php.

References Auth_OpenID_findOPLocalIdentifier(), and isOPIdentifier().

{
// Set the state of this object based on the contents of the
// service element. Return true if successful, false if not
// (if findOPLocalIdentifier returns false).
$this->type_uris = $type_uris;
$this->server_url = $uri;
$this->used_yadis = true;
if (!$this->isOPIdentifier()) {
$this->claimed_id = $yadis_url;
$service_element,
$this->type_uris);
if ($this->local_id === false) {
return false;
}
}
return true;

+ Here is the call graph for this function:

Auth_OpenID_ServiceEndpoint::preferredNamespace ( )

Definition at line 101 of file Discover.php.

References Auth_OpenID_OPENID1_NS, Auth_OpenID_OPENID2_NS, Auth_OpenID_TYPE_2_0, and Auth_OpenID_TYPE_2_0_IDP.

Referenced by compatibilityMode().

{
if (in_array(Auth_OpenID_TYPE_2_0_IDP, $this->type_uris) ||
in_array(Auth_OpenID_TYPE_2_0, $this->type_uris)) {
} else {
}

+ Here is the caller graph for this function:

Auth_OpenID_ServiceEndpoint::supportsType (   $type_uri)

Definition at line 134 of file Discover.php.

References Auth_OpenID_TYPE_2_0, and isOPIdentifier().

Referenced by matchTypes().

{
// Does this endpoint support this type?
return ((in_array($type_uri, $this->type_uris)) ||
(($type_uri == Auth_OpenID_TYPE_2_0) &&
$this->isOPIdentifier()));

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Auth_OpenID_ServiceEndpoint::usesExtension (   $extension_uri)

Definition at line 96 of file Discover.php.

{
return in_array($extension_uri, $this->type_uris);

The documentation for this class was generated from the following file: