From 29902ca9e12f3b58bce0064fd14ccd9dd01b8f59 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Wed, 28 Apr 2010 08:16:04 +0000
Subject: [PATCH] IdP: Slight refactoring of resumeauth.php

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2273 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/core/www/idp/resumeauth.php | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)

diff --git a/modules/core/www/idp/resumeauth.php b/modules/core/www/idp/resumeauth.php
index 5bf4a394e..ba2803e4e 100644
--- a/modules/core/www/idp/resumeauth.php
+++ b/modules/core/www/idp/resumeauth.php
@@ -1,15 +1,14 @@
 <?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);
-- 
GitLab