diff options
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']) |