diff options
author | tailor <cygnus@janrain.com> | 2007-03-22 18:22:00 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2007-03-22 18:22:00 +0000 |
commit | 8ab6cc345e221f1e931597faeadfd345baf3ffda (patch) | |
tree | cd2c33ecd8bd5602489d1d817fd1cc5cbaddb412 /examples/server/lib/session.php | |
parent | 900ae4d1d1cbdda4ce918ca8a813d1364fd73907 (diff) | |
download | php-openid-8ab6cc345e221f1e931597faeadfd345baf3ffda.zip php-openid-8ab6cc345e221f1e931597faeadfd345baf3ffda.tar.gz php-openid-8ab6cc345e221f1e931597faeadfd345baf3ffda.tar.bz2 |
[project @ Example server overhaul; add OpenID 2 features]
Diffstat (limited to 'examples/server/lib/session.php')
-rw-r--r-- | examples/server/lib/session.php | 40 |
1 files changed, 2 insertions, 38 deletions
diff --git a/examples/server/lib/session.php b/examples/server/lib/session.php index 1a51d79..76b28bd 100644 --- a/examples/server/lib/session.php +++ b/examples/server/lib/session.php @@ -37,7 +37,7 @@ function getServerURL() } else { $p = ':' . $port; } - + return "http$s://$host$p$path"; } @@ -83,32 +83,12 @@ function getServer() static $server = null; if (!isset($server)) { $server =& new Auth_OpenID_Server(getOpenIDStore(), - getServerURL()); + buildURL()); } return $server; } /** - * Return whether the trust root is currently trusted - */ -function isTrusted($identity_url, $trust_root) -{ - // from config.php - global $trusted_sites; - - if ($identity_url != getLoggedInUser()) { - return false; - } - - if (in_array($trust_root, $trusted_sites)) { - return true; - } - - $sites = getSessionSites(); - return isset($sites[$trust_root]) && $sites[$trust_root]; -} - -/** * Return a hashed form of the user's password */ function hashPassword($password) @@ -144,22 +124,6 @@ function setLoggedInUser($identity_url=null) } } -function setSessionSites($sites=null) -{ - if (!isset($sites)) { - unset($_SESSION['session_sites']); - } else { - $_SESSION['session_sites'] = serialize($sites); - } -} - -function getSessionSites() -{ - return isset($_SESSION['session_sites']) - ? unserialize($_SESSION['session_sites']) - : false; -} - function getRequestInfo() { return isset($_SESSION['request']) |