From 824f74cebea48c4b1142ccf07d839bc45f5c5e3b Mon Sep 17 00:00:00 2001
From: steel <mael.acier@ensiie.fr>
Date: Sat, 18 Jan 2025 15:52:33 +0100
Subject: [PATCH] fix: update client ID and secret in oidc.php for improved
 security and configuration

---
 oidc.php | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/oidc.php b/oidc.php
index 72012f7..55ed030 100644
--- a/oidc.php
+++ b/oidc.php
@@ -1,7 +1,7 @@
 <?php
 // Remplir ces champs avec les valeurs obtenues sur AriseID Connect
-$clientId = getenv('AIDC_CLIENT_ID') ?: '6a028017-3100-44c6-a837-9752c3b9b8c4';
-$clientSecret = getenv('AIDC_CLIENT_SECRET') ?: 'kazgNEQ26MstoIELYeFLftkTK_';
+$clientId = getenv('AIDC_CLIENT_ID') ?: 'be28aa62-643f-42b4-80ae-902d45f93331';
+$clientSecret = getenv('AIDC_CLIENT_SECRET') ?: 'secret-gimydg6n7ddn6qwen6ypvccmrc4kpccul6l3cmdh4zbym4hwghrq';
 
 $oauthURLBase = getenv('OAUTH_SERVER') ?: 'https://oidc.iiens.net';
 // L'URL à laquelle on enverra d'abord l'utilisateur pour obtenir son autorisation
@@ -12,10 +12,10 @@ $tokenURL = "{$oauthURLBase}/oauth2/token";
 $userinfoURL = "{$oauthURLBase}/userinfo";
 
 // L'URL racine à utiliser pour effectuer des demandes d'API authentifiées
-$apiURLBase =  getenv('API_SERVER') ?: 'https://api.iiens.net';
+$apiURLBase = getenv('API_SERVER') ?: 'https://api.iiens.net';
 
 // L'URL de ce script, utilisé comme URL de redirection
-$baseURL = (getenv('DOKKU_PROXY_SSL_PORT') ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' && $_SERVER['SERVER_PORT'] != '443' ? ':' . $_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF'];
+$baseURL = (getenv('DOKKU_PROXY_SSL_PORT') ? 'https://' : 'http://') . $_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] != '80' ? ':' . $_SERVER['SERVER_PORT'] : '') . $_SERVER['PHP_SELF'];
 
 // On lance une session afin d'avoir un endroit où stocker les données entre les redirections
 session_start();
@@ -126,7 +126,6 @@ $jsonFlags = JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES
 
 <body>
   <main>
-    <?php echo $baseURL; ?>
     <?php if (empty($_SESSION['user_id'])): ?>
       <h3>Non connecté</h3>
       <a href="?action=login"><button>Se connecter</button></a>
-- 
GitLab