summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2008-06-05 19:22:41 +0000
committertailor <cygnus@janrain.com>2008-06-05 19:22:41 +0000
commita40cb87199be578c1d3bc4ecaa1223c11569a459 (patch)
treedf71613ffeed397440706102011ec9818cc7e067 /Auth/OpenID
parent160392b196414ce4a8d152b65c4aae75a8bc2aca (diff)
downloadphp-openid-a40cb87199be578c1d3bc4ecaa1223c11569a459.zip
php-openid-a40cb87199be578c1d3bc4ecaa1223c11569a459.tar.gz
php-openid-a40cb87199be578c1d3bc4ecaa1223c11569a459.tar.bz2
[project @ Fix Auth_OpenID_getAllowedReturnURLs, Auth_Yadis_DiscoveryResult::usedYadisLocation, add Auth_Yadis_getServiceEndpoints, tests]
Diffstat (limited to 'Auth/OpenID')
-rw-r--r--Auth/OpenID/TrustRoot.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/Auth/OpenID/TrustRoot.php b/Auth/OpenID/TrustRoot.php
index c420709..fbe8921 100644
--- a/Auth/OpenID/TrustRoot.php
+++ b/Auth/OpenID/TrustRoot.php
@@ -396,19 +396,24 @@ function Auth_OpenID_getAllowedReturnURLs($relying_party_url, &$fetcher,
$discover_function = array('Auth_Yadis_Yadis', 'discover');
}
+ $xrds_parse_cb = array('Auth_OpenID_ServiceEndpoint', 'fromXRDS');
+
list($rp_url_after_redirects, $endpoints) =
- Auth_OpenID_discoverWithYadis($relying_party_url,
- $fetcher,
- 'Auth_OpenID_extractReturnURL',
- $discover_function);
+ Auth_Yadis_getServiceEndpoints($relying_party_url, $xrds_parse_cb,
+ $discover_function);
if ($rp_url_after_redirects != $relying_party_url) {
// Verification caused a redirect
return false;
}
+ call_user_func_array($discover_function,
+ array($relying_party_url, $fetcher));
+
$return_to_urls = array();
- foreach ($endpoints as $e) {
+ $matching_endpoints = Auth_OpenID_extractReturnURL($endpoints);
+
+ foreach ($matching_endpoints as $e) {
$return_to_urls[] = $e->server_url;
}