getIdentity() === null) { // not actually logged in anyway header('Location: ' . nextTarget($config)); return; } $resp = new Psso\XMLResponse; $resp->doc->addAttribute('title', L('logout.title')); $resp->doc->addAttribute('kind', 'challenges'); $form = $resp->doc->addChild('form'); $form->addChild('p', L('logout.warning')); $form->addAttribute('method', 'post'); $form->addChild('button', L('logout.confirm')); $resp->send(); } function POST(array $config) { $session = Psso\Session::get(); $session->setIdentity(null); header('Location: ' . nextTarget($config)); }