Skip to content

Commit

Permalink
Fix OIDC plugin getOidcInstance() logic
Browse files Browse the repository at this point in the history
Fix issue with arOidc::getOidcInstance() where if it were called a
second time getOidcInstance() would return null instead of an instance
of OpenIDConnectClient.
  • Loading branch information
sbreker committed Oct 28, 2024
1 parent e42994a commit c22ac22
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions plugins/arOidcPlugin/lib/arOidc.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand All @@ -32,11 +31,6 @@ class arOidc
*/
public static function getOidcInstance()
{
// Return if already initialized.
if (self::$oidcIsInitialized) {
return;
}

$oidc = new OpenIDConnectClient();

// Validate redirect URL.
Expand All @@ -46,8 +40,6 @@ public static function getOidcInstance()
}
$oidc->setRedirectURL($redirectUrl);

self::$oidcIsInitialized = true;

return $oidc;
}

Expand Down

0 comments on commit c22ac22

Please sign in to comment.