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

SAML2_Binding: Check for request parameters when detecting the binding.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1646 44740490-163a-0410-bde0-09ae8108e29a
parent 2b5a264d
No related branches found
No related tags found
No related merge requests found
......@@ -51,12 +51,19 @@ abstract class SAML2_Binding {
public static function getCurrentBinding() {
switch ($_SERVER['REQUEST_METHOD']) {
case 'GET':
return new SAML2_HTTPRedirect();
if (array_key_exists('SAMLRequest', $_REQUEST) || array_key_exists('SAMLResponse', $_REQUEST)) {
return new SAML2_HTTPRedirect();
}
break;
case 'POST':
return new SAML2_HTTPPost();
default:
throw new Exception('Unable to find the current binding.');
if (array_key_exists('SAMLRequest', $_REQUEST) || array_key_exists('SAMLResponse', $_REQUEST)) {
return new SAML2_HTTPPost();
}
break;
}
throw new Exception('Unable to find the current binding.');
}
......
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