diff options
author | tailor <cygnus@cprogrammer.org> | 2007-11-19 20:47:01 +0000 |
---|---|---|
committer | tailor <cygnus@cprogrammer.org> | 2007-11-19 20:47:01 +0000 |
commit | 3b6a85f6b7ee7c6528f0a0b76e1dc9097293f07c (patch) | |
tree | bc27205242168d5c3bd0799a09041e4396d9e4fa /Auth | |
parent | daf41dbf07e559604d039cf7a26391d068ca295d (diff) | |
download | php-openid-3b6a85f6b7ee7c6528f0a0b76e1dc9097293f07c.zip php-openid-3b6a85f6b7ee7c6528f0a0b76e1dc9097293f07c.tar.gz php-openid-3b6a85f6b7ee7c6528f0a0b76e1dc9097293f07c.tar.bz2 |
[project @ Add getDisplayIdentifier() to SuccessResponse]
Diffstat (limited to 'Auth')
-rw-r--r-- | Auth/OpenID/Consumer.php | 8 | ||||
-rw-r--r-- | Auth/OpenID/Discover.php | 10 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php index 565f3d6..0d6f9d7 100644 --- a/Auth/OpenID/Consumer.php +++ b/Auth/OpenID/Consumer.php @@ -1950,6 +1950,14 @@ class Auth_OpenID_ConsumerResponse { $this->identity_url = $endpoint->claimed_id; } } + + function getDisplayIdentifier() + { + if ($this->endpoint !== null) { + return $this->endpoint->getDisplayIdentifier(); + } + return null; + } } /** diff --git a/Auth/OpenID/Discover.php b/Auth/OpenID/Discover.php index 8f4c80b..b8f4d56 100644 --- a/Auth/OpenID/Discover.php +++ b/Auth/OpenID/Discover.php @@ -44,6 +44,15 @@ class Auth_OpenID_ServiceEndpoint { $this->local_id = null; $this->canonicalID = null; $this->used_yadis = false; // whether this came from an XRDS + $this->display_identifier = null; + } + + function getDisplayIdentifier() + { + if ($this->display_identifier) { + return $this->display_identifier; + } + return $this->claimed_id; } function usesExtension($extension_uri) @@ -496,6 +505,7 @@ function Auth_OpenID_discoverXRI($iname, &$fetcher) for ($i = 0; $i < count($openid_services); $i++) { $openid_services[$i]->canonicalID = $canonicalID; $openid_services[$i]->claimed_id = $canonicalID; + $openid_services[$i]->display_identifier = $iname; } // FIXME: returned xri should probably be in some normal form |