-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- currently only supports aai-demo.eosc-portal.eu
- Loading branch information
1 parent
fdde1eb
commit 59c41bc
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
|
||
namespace org\gocdb\security\authentication; | ||
|
||
require_once __DIR__ . '/../IAuthentication.php'; | ||
|
||
/** | ||
* AuthToken for use with the EOSC AAI | ||
* | ||
* Requires installation/config of mod_auth_openidc before use. | ||
* | ||
* The token is stateless because it relies on the mod_auth_openidc | ||
* session and simply reads the attributes stored in the session. | ||
*/ | ||
class EOSCAAIAuthToken extends OIDCAuthToken | ||
{ | ||
|
||
public function __construct() | ||
{ | ||
$this->acceptedIssuers = array("https://aai-demo.eosc-portal.eu/auth/realms/core"); | ||
$this->authRealm = "EOSC Proxy IdP"; | ||
$this->groupHeader = "OIDC_CLAIM_eduperson_entitlement"; | ||
$this->groupSplitChar = ','; | ||
$this->bannedGroups = array(); | ||
$this->requiredGroups = array("urn:geant:eosc-portal.eu:res:gocdb.eosc-portal.eu"); | ||
$this->helpString = 'Please seek assistance by opening a ticket against the ' . | ||
'"EOSC AAI: Core Infrastructure Proxy" group in ' . | ||
'<a href=https://eosc-helpdesk.eosc-portal.eu/>https://eosc-helpdesk.eosc-portal.eu/</a>'; | ||
|
||
if (isset($_SERVER['OIDC_access_token'])) | ||
{ | ||
$this->setTokenFromSession(); | ||
} | ||
} | ||
} |