Skip to content

Commit

Permalink
feat: add getIdPList
Browse files Browse the repository at this point in the history
  • Loading branch information
damikael committed Jul 21, 2023
1 parent 5dffcb1 commit 6bc423f
Showing 1 changed file with 25 additions and 12 deletions.
37 changes: 25 additions & 12 deletions setup/sdk/spid-php.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,28 @@
{{IDPS}}
}

public function isSPIDEnabled() {
return self::SPID_ENABLED;
}

public function isCIEEnabled() {
return self::CIE_ENABLED;
}

public function isSPIDEnabled() {
return self::SPID_ENABLED;
}

public function isCIEEnabled() {
return self::CIE_ENABLED;
}

public function getIdPList() {
require_once("vendor/simplesamlphp/simplesamlphp/metadata/saml20-idp-remote.php");
$list = array();
foreach($this->idps as $code=>$entity_id) {
array_push($list, array(
'name' => $metadata[$entity_id]['name']['it'],
'code' => $code,
'image' => $metadata[$entity_id]['icon']
));
}

return $list;
}

public function getIdP() {
return $this->spid_auth->getAuthData('saml:sp:IdP');
}
Expand Down Expand Up @@ -153,11 +167,11 @@
}
}
}
public function getLogoutURL($returnTo = null) {
return $this->spid_auth->getLogoutURL($returnTo);
}
public function getAttributes() {
return $this->spid_auth->getAttributes();
}
Expand Down Expand Up @@ -516,8 +530,7 @@

return $button_li;
}



public function insertCIEButton($size='default') {
echo "
<div class=\"cie-button\" style=\"width: 280px;\">
Expand Down

0 comments on commit 6bc423f

Please sign in to comment.