diff options
author | tailor <dag@janrain.com> | 2008-05-30 20:20:50 +0000 |
---|---|---|
committer | tailor <dag@janrain.com> | 2008-05-30 20:20:50 +0000 |
commit | 9404b62c9afe6ec9c65d1dabafa1f0d449183c61 (patch) | |
tree | 4014b280aeb0e807f9ada15a2de793de3571f7d4 /Auth/OpenID | |
parent | 117fa62d44f207906608b191d7f4399dfd4c7635 (diff) | |
download | php-openid-9404b62c9afe6ec9c65d1dabafa1f0d449183c61.zip php-openid-9404b62c9afe6ec9c65d1dabafa1f0d449183c61.tar.gz php-openid-9404b62c9afe6ec9c65d1dabafa1f0d449183c61.tar.bz2 |
[project @ Remove URL fragment in ServiceEndpoint->getDisplayIdentifier]
Diffstat (limited to 'Auth/OpenID')
-rw-r--r-- | Auth/OpenID/Discover.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Auth/OpenID/Discover.php b/Auth/OpenID/Discover.php index 4e8e402..1bdfa26 100644 --- a/Auth/OpenID/Discover.php +++ b/Auth/OpenID/Discover.php @@ -52,7 +52,20 @@ class Auth_OpenID_ServiceEndpoint { if ($this->display_identifier) { return $this->display_identifier; } - return $this->claimed_id; + 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; } function usesExtension($extension_uri) |