Skip to content

Commit

Permalink
Remove EOSC demo aai from ShibAuthToken
Browse files Browse the repository at this point in the history
- it should be handled by the new EOSCAAIAuthToken
  • Loading branch information
gregcorbett committed Feb 7, 2024
1 parent c5298da commit b807ab1
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/Authentication/AuthTokens/ShibAuthToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,26 +164,6 @@ private function getAttributesInitToken(){
$this->userDetails = array('AuthenticationRealm' => array('EGI Proxy IdP'));
return;
}
else if($idp == 'https://aai-demo.eosc-portal.eu/proxy/saml2/idp/metadata.php'){
if( empty($_SERVER['voPersonID'])){
die('Did not receive required voPersonID attributes from the EOSC Demo Proxy Identity Provider to complete authentication, please contact gocdb-admins');
}
if(empty($_SERVER['entitlement'])){
die('Did not receive the required entitlement attribute from the EOSC Demo Proxy Identity Provider, please contact gocdb-admins');
}
$entitlementValuesArray = explode(';', $_SERVER['entitlement']);
if( !in_array('urn:geant:eosc-portal.eu:res:gocdb.eosc-portal.eu', $entitlementValuesArray) ){
$HTML = '<ul><li>You authenticated to the EOSC Demo Proxy Identity Provider using a method that does not provide a GOCDB entitlement.</li><li>Login is required with a GOCDB entitlement.</li><li>To gain access, you will need to login to the Proxy IdP using a scheme that provides a gocdb entitlement.</li><li>Please logout or restart your browser and attempt to login again.</li></ul>';
$HTML .= "<div style='text-align: center;'>";
$HTML .= '<a href="'.htmlspecialchars(\Factory::$properties['LOGOUTURL']).'"><b><font colour="red">Logout</font></b></a>';
$HTML .= "</div>";
echo ($HTML);
die();
}
$this->principal = $_SERVER['voPersonID'];
$this->userDetails = array('AuthenticationRealm' => array('EOSC Demo Proxy IdP'));
return;
}
else if($idp == 'https://aai.eosc-portal.eu/proxy/saml2/idp/metadata.php'){
if( empty($_SERVER['voPersonID'])){
die('Did not receive required voPersonID attributes from the EOSC Proxy Identity Provider to complete authentication, please contact gocdb-admins');
Expand Down

0 comments on commit b807ab1

Please sign in to comment.