9 * @author Bill Shupp <hostmaster@shupp.org>
10 * @copyright 2009 Bill Shupp
11 * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD
12 * @link http://github.com/shupp/openid
15 set_include_path(dirname(__FILE__) . '/../../:' . get_include_path());
20 require_once 'OpenID/RelyingParty.php';
21 require_once 'OpenID/Discover.php';
22 require_once 'OpenID/Store.php';
23 require_once 'OpenID/Extension/SREG10.php';
24 require_once 'OpenID/Extension/SREG11.php';
25 require_once 'OpenID/Extension/AX.php';
26 require_once 'OpenID/Extension/UI.php';
27 require_once 'OpenID/Extension/OAuth.php';
28 require_once 'OpenID/Message.php';
29 require_once 'OpenID/Observer/Log.php';
30 require_once 'Net/URL2.php';
32 // Determine realm and return_to
34 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
37 $base .= '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
40 $returnTo = $base . dirname($_SERVER['PHP_SELF']);
41 if ($returnTo[strlen($returnTo) - 1] != '/') {
46 // SQL storage example
47 // $storeOptions = array(
48 // 'dsn' => 'mysql://user:pass@db.example.com/openid'
50 // OpenID::setStore(OpenID_Store::factory('MDB2', $storeOptions));
52 // // The first time you run it, you'll also need to create the tables:
53 // OpenID::getStore()->createTables();