From 9d561b116aa9e0bed2d14cb2839b3277a6b02142 Mon Sep 17 00:00:00 2001
From: aboire <thomas.craipeau@gmail.com>
Date: Thu, 27 Mar 2025 11:50:59 +0400
Subject: [PATCH] =?UTF-8?q?ajout=20d'un=20identifiant=20de=20client=20supp?=
 =?UTF-8?q?l=C3=A9mentaire=20dans=20le=20gestionnaire=20d'authentification?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 controllers/oauth/AuthHandler.php | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/controllers/oauth/AuthHandler.php b/controllers/oauth/AuthHandler.php
index 00d687f77..d9bd124e7 100755
--- a/controllers/oauth/AuthHandler.php
+++ b/controllers/oauth/AuthHandler.php
@@ -25,7 +25,17 @@ class AuthHandler
     {
         $attributes = $this->client->getUserAttributes();
         
-        if($this->client->getId() == "ademe" || $this->client->getId() == "tierslieuxorg" || $this->client->getId() == "fabmobio" || $this->client->getId() == "tierslieuxoccitanie"){
+        if($this->client->getId() == "ademe" || $this->client->getId() == "tierslieuxorg" || $this->client->getId() == "fabmobio" || $this->client->getId() == "tierslieuxoccitanie" || $this->client->getId() == "lescaecoop") {
+            // service configuré ici
+            // var_dump($attributes);
+            // exit;
+            // $email = ArrayHelper::getValue($attributes, 'email');
+            // $name = ArrayHelper::getValue($attributes, 'name');
+            // $username = ArrayHelper::getValue($attributes, 'preferred_username');
+            // if(empty($username)){
+            //     $username = ArrayHelper::getValue($attributes, 'username');
+            // }
+            // $id = ArrayHelper::getValue($attributes, 'sub');
         $email = ArrayHelper::getValue($attributes, 'email');
         $name = ArrayHelper::getValue($attributes, 'name');
         $username = ArrayHelper::getValue($attributes, 'preferred_username');
-- 
GitLab