From 5eaadb83e5697db5c6e0123e496c9a3353681707 Mon Sep 17 00:00:00 2001
From: Thijs Kinkhorst <thijs@kinkhorst.com>
Date: Wed, 5 Jan 2022 13:53:44 +0000
Subject: [PATCH] For technicalcontact_name, set it in givenName since name is
 no longer supported.

This was already the result after processing previously.
---
 modules/saml/lib/Auth/Source/SP.php | 2 +-
 modules/saml/lib/IdP/SAML2.php      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/saml/lib/Auth/Source/SP.php b/modules/saml/lib/Auth/Source/SP.php
index 4424b9c66..867bf7327 100644
--- a/modules/saml/lib/Auth/Source/SP.php
+++ b/modules/saml/lib/Auth/Source/SP.php
@@ -197,7 +197,7 @@ class SP extends \SimpleSAML\Auth\Source
         if ($email && $email !== 'na@example.org') {
             $contact = [
                 'emailAddress' => $email,
-                'name' => $globalConfig->getString('technicalcontact_name', null),
+                'givenName' => $globalConfig->getString('technicalcontact_name', null),
                 'contactType' => 'technical',
             ];
             $metadata['contacts'][] = Utils\Config\Metadata::getContact($contact);
diff --git a/modules/saml/lib/IdP/SAML2.php b/modules/saml/lib/IdP/SAML2.php
index c1c6f507d..3b9394318 100644
--- a/modules/saml/lib/IdP/SAML2.php
+++ b/modules/saml/lib/IdP/SAML2.php
@@ -917,7 +917,7 @@ class SAML2
         if ($email && $email !== 'na@example.org') {
             $contact = [
                 'emailAddress' => $email,
-                'name' => $globalConfig->getString('technicalcontact_name', null),
+                'givenName' => $globalConfig->getString('technicalcontact_name', null),
                 'contactType' => 'technical',
             ];
             $metadata['contacts'][] = Utils\Config\Metadata::getContact($contact);
-- 
GitLab