<?php require_once "sso.php"; $sso = new SingleSignOn_Broker(); $user = $sso->getInfo(); if (!$user) { header("Location: login.php", true, 307); exit; } ?> <html> <head> <title>Single Sign-On demo (<?php echo $sso->broker; ?> )</title> </head> <body> <h1>Single Sign-On demo</h1> <h2><?php echo $sso->broker; ?> </h2> <dl> <? foreach($user as $key=>$value) : ?> <dt><?php echo $key; ?> </dt><dd><?php
<?php require_once "sso.php"; $sso = new SingleSignOn_Broker(); if (!empty($_GET['logout'])) { $sso->logout(); } elseif ($sso->getInfo() || $_SERVER['REQUEST_METHOD'] == 'POST' && $sso->login()) { header("Location: index.php", true, 303); exit; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $errmsg = "Login failed"; } ?> <html> <head> <title>Single Sign-On demo (<?php echo $sso->broker; ?> ) - Login</title> </head> <body> <h1>Single Sign-On demo - Login</h1> <h2><?php echo $sso->broker; ?> </h2> <? if (isset($errmsg)): ?><div style="color:red"><?php echo $errmsg;