From d5a8dec097fdb7ee5ee7de9ccf38421a1b8ec875 Mon Sep 17 00:00:00 2001 From: Sae126V Date: Tue, 6 Aug 2024 08:27:42 +0000 Subject: [PATCH 1/2] Update code to reflect the new EGI checkin error message --- .../AuthTokens/ShibAuthToken.php | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/Authentication/AuthTokens/ShibAuthToken.php b/lib/Authentication/AuthTokens/ShibAuthToken.php index 3361b5cc8..b06d55b40 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,22 @@ public static function isStateless() { return true; } + private function getEntitlementErrorMessage() + { + $refedsResAndSchURL = "https://refeds.org/category/research-and-scholarship"; + $resourceLink = "https://docs.egi.eu/internal/configuration-database/access"; + $sectionFragmentInfo = "/#using-institutional-account-via-egi-check-in"; + $documentationURL = $resourceLink . $sectionFragmentInfo; + + return ''; + } } From 819621219c0700a1ea6d3e1ba02ee13864b386ac Mon Sep 17 00:00:00 2001 From: Sae126V Date: Wed, 7 Aug 2024 09:20:08 +0000 Subject: [PATCH 2/2] Update code to fix line length issues --- lib/Authentication/AuthTokens/ShibAuthToken.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/lib/Authentication/AuthTokens/ShibAuthToken.php b/lib/Authentication/AuthTokens/ShibAuthToken.php index b06d55b40..67fef8259 100644 --- a/lib/Authentication/AuthTokens/ShibAuthToken.php +++ b/lib/Authentication/AuthTokens/ShibAuthToken.php @@ -207,18 +207,23 @@ public static function isStateless() { 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 ''; }