diff options
Diffstat (limited to 'routes/index.php')
| -rw-r--r-- | routes/index.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/routes/index.php b/routes/index.php index 685ab92..f884be5 100644 --- a/routes/index.php +++ b/routes/index.php @@ -1,8 +1,20 @@ <?php function GET() { + $session = Psso\Session::get(); + + // all of this markup is temporary and for testing only :3 $resp = new Psso\XMLResponse; $content = $resp->doc->addChild('content'); $content->addChild('p', 'Welcome to Pleasant SSO!'); + $identity = $session->getIdentity(); + $content->addChild('pre', 'Your identity: ' . print_r($identity, true)); + if ($identity === null) { + $link = $content->addChild('a', L('login.title')); + $link->addAttribute('href', '/login'); + } else { + $link = $content->addChild('a', L('logout.title')); + $link->addAttribute('href', '/logout'); + } $resp->send(); } |
