Skip to content
Snippets Groups Projects
Commit 2f64bc58 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Adding a saml:idp parameter to select IdP for modules/core/www/as_login.php

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2859 44740490-163a-0410-bde0-09ae8108e29a
parent 6aa6006e
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,24 @@ if (!is_string($_REQUEST['AuthId'])) {
throw new SimpleSAML_Error_BadRequest('Missing AuthId parameter.');
}
$as = new SimpleSAML_Auth_Simple($_REQUEST['AuthId']);
$as->requireAuth(array(
/*
* Setting up the options for the requireAuth() call later..
*/
$options = array(
'ReturnTo' => $_REQUEST['ReturnTo'],
));
);
/*
* Allows a saml:idp query string parameter specify the IdP entity ID to be used
* as used by the DiscoJuice embedded client.
*/
if (!empty($_REQUEST['saml:idp'])) {
$options['saml:idp'] = $_REQUEST['saml:idp'];
}
$as = new SimpleSAML_Auth_Simple($_REQUEST['AuthId']);
$as->requireAuth($options);
SimpleSAML_Utilities::redirect($_REQUEST['ReturnTo']);
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