X-Git-Url: https://git.cweiske.de/phorkie.git/blobdiff_plain/e380a7f6aaefb1bbd16a595b6f855ce036501981..e280bcc8d00257607f2626f85afd01eec50831b3:/www/login.php?ds=sidebyside diff --git a/www/login.php b/www/login.php index e3d165d..150cf25 100644 --- a/www/login.php +++ b/www/login.php @@ -1,42 +1,19 @@ - * @copyright 2009 Bill Shupp - * @license http://www.opensource.org/licenses/bsd-license.php FreeBSD - * @link http://github.com/shupp/openid - */ namespace phorkie; -// A tool for testing Relying Party functionality -set_include_path( - __DIR__ . '/../../src/' - . PATH_SEPARATOR . get_include_path() -); - $pageRequiresLogin = false; +$noSecurityCheck = true; require_once 'www-header.php'; -require_once 'openid/config.php'; - if (isset($_REQUEST['logout'])) { unset($_SESSION); session_destroy(); - $redirect = 'http://' . $_SERVER['HTTP_HOST']; - header('Location: ' . filter_var($redirect, FILTER_SANITIZE_URL)); - exit; + header('Location: ' . Tools::fullUrl('/')); + exit(); } if (!count($_GET) && !count($_POST)) { - render( - 'login', - null - ); - exit; + render('login'); + exit(); } // Hackaround Non-Javascript Login Page @@ -52,6 +29,9 @@ if (isset($_POST['openid_url'])) { $openid_url = null; } +$realm = Tools::fullUrl('/'); +$returnTo = Tools::fullUrl('/login'); + try { $o = new \OpenID_RelyingParty($returnTo, $realm, $openid_url); } catch (OpenID_Exception $e) {