summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/consumer/common.php6
-rw-r--r--examples/consumer/try_auth.php5
-rw-r--r--examples/detect.php4
3 files changed, 10 insertions, 5 deletions
diff --git a/examples/consumer/common.php b/examples/consumer/common.php
index 5e63fce..67f4273 100644
--- a/examples/consumer/common.php
+++ b/examples/consumer/common.php
@@ -58,8 +58,9 @@ function &getStore() {
" Please check the effective permissions.";
exit(0);
}
+ $r = new Auth_OpenID_FileStore($store_path);
- return new Auth_OpenID_FileStore($store_path);
+ return $r;
}
function &getConsumer() {
@@ -68,7 +69,8 @@ function &getConsumer() {
* earlier.
*/
$store = getStore();
- return new Auth_OpenID_Consumer($store);
+ $r = new Auth_OpenID_Consumer($store);
+ return $r;
}
function getScheme() {
diff --git a/examples/consumer/try_auth.php b/examples/consumer/try_auth.php
index 7efec76..4873140 100644
--- a/examples/consumer/try_auth.php
+++ b/examples/consumer/try_auth.php
@@ -37,7 +37,10 @@ function run() {
$auth_request->addExtension($sreg_request);
}
- $policy_uris = $_GET['policies'];
+ $policy_uris = null;
+ if (isset($_GET['policies'])) {
+ $policy_uris = $_GET['policies'];
+ }
$pape_request = new Auth_OpenID_PAPE_Request($policy_uris);
if ($pape_request) {
diff --git a/examples/detect.php b/examples/detect.php
index 55fcaa8..123e496 100644
--- a/examples/detect.php
+++ b/examples/detect.php
@@ -434,8 +434,8 @@ function detect_fetcher($r, &$out)
$ok = true;
$fetcher = Auth_Yadis_Yadis::getHTTPFetcher();
- $fetch_url = 'http://www.openidenabled.com/resources/php-fetch-test';
- $expected_url = $fetch_url . '.txt';
+ $fetch_url = 'http://gist.github.com/raw/465630/c57eff55ebc0c54973903af5f72bac72762cf4f4/helloworld';
+ $expected_url = $fetch_url;// . '.txt';
$result = $fetcher->get($fetch_url);
if (isset($result)) {