From c22ac22e329b8d6d4fa0788146711baf199731f4 Mon Sep 17 00:00:00 2001 From: Steve Breker Date: Thu, 22 Aug 2024 15:19:17 -0700 Subject: [PATCH] Fix OIDC plugin getOidcInstance() logic Fix issue with arOidc::getOidcInstance() where if it were called a second time getOidcInstance() would return null instead of an instance of OpenIDConnectClient. --- plugins/arOidcPlugin/lib/arOidc.class.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plugins/arOidcPlugin/lib/arOidc.class.php b/plugins/arOidcPlugin/lib/arOidc.class.php index f9d450032e..aae0e6d073 100644 --- a/plugins/arOidcPlugin/lib/arOidc.class.php +++ b/plugins/arOidcPlugin/lib/arOidc.class.php @@ -21,7 +21,6 @@ class arOidc { - protected static $oidcIsInitialized = false; protected static $validTokenNames = ['access-token', 'id-token', 'verified-claims', 'user-info']; protected static $validUserMatchingSources = ['oidc-email', 'oidc-username']; @@ -32,11 +31,6 @@ class arOidc */ public static function getOidcInstance() { - // Return if already initialized. - if (self::$oidcIsInitialized) { - return; - } - $oidc = new OpenIDConnectClient(); // Validate redirect URL. @@ -46,8 +40,6 @@ public static function getOidcInstance() } $oidc->setRedirectURL($redirectUrl); - self::$oidcIsInitialized = true; - return $oidc; }