Skip to content
Snippets Groups Projects
Commit 29902ca9 authored by Olav Morken's avatar Olav Morken
Browse files

IdP: Slight refactoring of resumeauth.php

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2273 44740490-163a-0410-bde0-09ae8108e29a
parent 8d08bc4b
No related branches found
No related tags found
No related merge requests found
<?php
if (isset($_REQUEST['RequestID'])) {
/* Backwards-compatibility with old authentication pages. */
$session = SimpleSAML_Session::getInstance();
$requestcache = $session->getAuthnRequest('saml2', (string)$_REQUEST['RequestID']);
if (!$requestcache) {
throw new Exception('Could not retrieve cached RequestID = ' . $authId);
}
$state = $requestcache['State'];
SimpleSAML_IdP::postAuth($state);
} else {
if (!isset($_REQUEST['RequestID'])) {
throw new SimpleSAML_Error_BadRequest('Missing required URL parameter.');
}
/* Backwards-compatibility with old authentication pages. */
$session = SimpleSAML_Session::getInstance();
$requestcache = $session->getAuthnRequest('saml2', (string)$_REQUEST['RequestID']);
if (!$requestcache) {
throw new Exception('Could not retrieve cached RequestID = ' . $authId);
}
$state = $requestcache['State'];
SimpleSAML_IdP::postAuth($state);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment