diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-12-15 20:07:48 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-12-15 20:07:48 -0500 |
commit | 580cd62f0a4fac5dba37a8a152afaecd99e8c767 (patch) | |
tree | ad71f414174ffe91536ecb9875377ce2682b53fc /models/openid-php-openid-782224d/examples/consumer/common.php | |
parent | d9bf22a0e29c2a70049443a0ae8521a2c0492c8b (diff) | |
download | elgg-580cd62f0a4fac5dba37a8a152afaecd99e8c767.tar.gz elgg-580cd62f0a4fac5dba37a8a152afaecd99e8c767.tar.bz2 |
removed old libraries - depends on openid_api now
Diffstat (limited to 'models/openid-php-openid-782224d/examples/consumer/common.php')
-rw-r--r-- | models/openid-php-openid-782224d/examples/consumer/common.php | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/models/openid-php-openid-782224d/examples/consumer/common.php b/models/openid-php-openid-782224d/examples/consumer/common.php deleted file mode 100644 index 2f01ba0a6..000000000 --- a/models/openid-php-openid-782224d/examples/consumer/common.php +++ /dev/null @@ -1,97 +0,0 @@ -<?php - -$path_extra = dirname(dirname(dirname(__FILE__))); -$path = ini_get('include_path'); -$path = $path_extra . PATH_SEPARATOR . $path; -ini_set('include_path', $path); - -function displayError($message) { - $error = $message; - include 'index.php'; - exit(0); -} - -function doIncludes() { - /** - * Require the OpenID consumer code. - */ - require_once "Auth/OpenID/Consumer.php"; - - /** - * Require the "file store" module, which we'll need to store - * OpenID information. - */ - require_once "Auth/OpenID/FileStore.php"; - - /** - * Require the Simple Registration extension API. - */ - require_once "Auth/OpenID/SReg.php"; - - /** - * Require the PAPE extension module. - */ - require_once "Auth/OpenID/PAPE.php"; -} - -doIncludes(); - -global $pape_policy_uris; -$pape_policy_uris = array( - PAPE_AUTH_MULTI_FACTOR_PHYSICAL, - PAPE_AUTH_MULTI_FACTOR, - PAPE_AUTH_PHISHING_RESISTANT - ); - -function &getStore() { - /** - * This is where the example will store its OpenID information. - * You should change this path if you want the example store to be - * created elsewhere. After you're done playing with the example - * script, you'll have to remove this directory manually. - */ - $store_path = "/tmp/_php_consumer_test"; - - if (!file_exists($store_path) && - !mkdir($store_path)) { - print "Could not create the FileStore directory '$store_path'. ". - " Please check the effective permissions."; - exit(0); - } - - return new Auth_OpenID_FileStore($store_path); -} - -function &getConsumer() { - /** - * Create a consumer object using the store object created - * earlier. - */ - $store = getStore(); - $consumer =& new Auth_OpenID_Consumer($store); - return $consumer; -} - -function getScheme() { - $scheme = 'http'; - if (isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') { - $scheme .= 's'; - } - return $scheme; -} - -function getReturnTo() { - return sprintf("%s://%s:%s%s/finish_auth.php", - getScheme(), $_SERVER['SERVER_NAME'], - $_SERVER['SERVER_PORT'], - dirname($_SERVER['PHP_SELF'])); -} - -function getTrustRoot() { - return sprintf("%s://%s:%s%s/", - getScheme(), $_SERVER['SERVER_NAME'], - $_SERVER['SERVER_PORT'], - dirname($_SERVER['PHP_SELF'])); -} - -?>
\ No newline at end of file |