From bb3414d93f84e2e06dd5121706b7ddb94a69807f 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 --- .../AuthTokens/ShibAuthToken.php | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/lib/Authentication/AuthTokens/ShibAuthToken.php b/lib/Authentication/AuthTokens/ShibAuthToken.php index 3361b5cc8..632bac5ea 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,21 @@ public static function isStateless() { return true; } + private function getEntitlementErrorMessage() + { + $resourceLink = "https://docs.egi.eu/internal/configuration-database"; + $sectionFragmentInfo = "/access/#using-institutional-account-via-egi-check-in"; + $documentationURL = $resourceLink . $sectionFragmentInfo; + + return ''; + } }