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

consentSimpleAdmin: Retrieve IdP and attributes from current authsource.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2646 44740490-163a-0410-bde0-09ae8108e29a
parent 77365319
No related branches found
No related tags found
No related merge requests found
......@@ -16,15 +16,12 @@
$config = SimpleSAML_Configuration::getInstance();
$consentconfig = SimpleSAML_Configuration::getConfig('module_consentSimpleAdmin.php');
// Get session object
$session = SimpleSAML_Session::getInstance();
$as = $consentconfig->getValue('auth');
$as = new SimpleSAML_Auth_Simple($as);
$as->requireAuth();
// Get all attributes
$attributes = $session->getAttributes();
$attributes = $as->getAttributes();
......@@ -43,9 +40,9 @@ $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler();
/*
* Get IdP id and metadata
*/
if($session->getIdP() != null) {
if($as->getAuthData('saml:sp:IdP') != null) {
// From a remote idp (as bridge)
$idp_entityid = $session->getIdP();
$idp_entityid = $as->getAuthData('saml:sp:IdP');
$idp_metadata = $metadata->getMetaData($idp_entityid, 'saml20-idp-remote');
} else {
// from the local idp
......
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