Skip to content

Commit 2ca4226

Browse files
committed
Add token for the EOSC Proxy IdPs
- currently only supports aai-demo.eosc-portal.eu
1 parent bc761ba commit 2ca4226

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
namespace org\gocdb\security\authentication;
4+
5+
require_once __DIR__ . '/../IAuthentication.php';
6+
7+
/**
8+
* AuthToken for use with the EOSC AAI
9+
*
10+
* Requires installation/config of mod_auth_openidc before use.
11+
*
12+
* The token is stateless because it relies on the mod_auth_openidc
13+
* session and simply reads the attributes stored in the session.
14+
*/
15+
class EOSCAAIAuthToken extends OIDCAuthToken
16+
{
17+
public function __construct()
18+
{
19+
$this->acceptedIssuers = array("https://aai-demo.eosc-portal.eu/auth/realms/core");
20+
$this->authRealm = "EOSC Proxy IdP";
21+
$this->groupHeader = "OIDC_CLAIM_eduperson_entitlement";
22+
$this->groupSplitChar = ',';
23+
$this->bannedGroups = array();
24+
$this->requiredGroups = array("urn:geant:eosc-portal.eu:res:gocdb.eosc-portal.eu");
25+
$this->helpString = 'Please seek assistance by opening a ticket against the ' .
26+
'"EOSC AAI: Core Infrastructure Proxy" group in ' .
27+
'<a href=https://eosc-helpdesk.eosc-portal.eu/>https://eosc-helpdesk.eosc-portal.eu/</a>';
28+
29+
if (isset($_SERVER['OIDC_access_token'])) {
30+
$this->setTokenFromSession();
31+
}
32+
}
33+
}

0 commit comments

Comments
 (0)