From 8dbcafdef87daadf630925daef5b749f69ed4745 Mon Sep 17 00:00:00 2001 From: Sae126V Date: Tue, 6 Aug 2024 08:27:42 +0000 Subject: [PATCH] Update code to reflect the new EGI checkin error message - Co-authored-by: gregcorbett --- .../AuthTokens/ShibAuthToken.php | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/Authentication/AuthTokens/ShibAuthToken.php b/lib/Authentication/AuthTokens/ShibAuthToken.php index 3361b5cc8..357470c9a 100644 --- a/lib/Authentication/AuthTokens/ShibAuthToken.php +++ b/lib/Authentication/AuthTokens/ShibAuthToken.php @@ -122,7 +122,7 @@ private function getAttributesInitToken(){ } if(empty($_SERVER['entitlement'])){ //die('Did not recieve the required entitlement attribute from the EGI Proxy IdP, please contact gocdb-admins'); - $HTML = ''; + $HTML = $this->getEntitlementErrorMessage(); $HTML .= "
"; $HTML .= 'Logout'; $HTML .= "
"; @@ -132,7 +132,7 @@ private function getAttributesInitToken(){ $entitlementValuesArray = explode(';', $_SERVER['entitlement']); if( !in_array('urn:mace:egi.eu:res:gocdb#aai.egi.eu', $entitlementValuesArray) ){ - $HTML = ''; + $HTML = $this->getEntitlementErrorMessage(); $HTML .= "
"; $HTML .= 'Logout'; $HTML .= "
"; @@ -204,4 +204,27 @@ public static function isStateless() { return true; } + private function getEntitlementErrorMessage() + { + $refedsResAndSchURL = "https://refeds.org/category/research-and-scholarship"; + $refedsSirtfiURL = "https://refeds.org/sirtfi"; + $resourceLink = "https://docs.egi.eu/internal/configuration-database/access"; + $sectionFragmentInfo = "/#using-institutional-account-via-egi-check-in"; + $documentationURL = $resourceLink . $sectionFragmentInfo; + + return ""; + } }