Skip to content

Commit c22ac22

Browse files
committed
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.
1 parent e42994a commit c22ac22

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

plugins/arOidcPlugin/lib/arOidc.class.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
class arOidc
2323
{
24-
protected static $oidcIsInitialized = false;
2524
protected static $validTokenNames = ['access-token', 'id-token', 'verified-claims', 'user-info'];
2625
protected static $validUserMatchingSources = ['oidc-email', 'oidc-username'];
2726

@@ -32,11 +31,6 @@ class arOidc
3231
*/
3332
public static function getOidcInstance()
3433
{
35-
// Return if already initialized.
36-
if (self::$oidcIsInitialized) {
37-
return;
38-
}
39-
4034
$oidc = new OpenIDConnectClient();
4135

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

49-
self::$oidcIsInitialized = true;
50-
5143
return $oidc;
5244
}
5345

0 commit comments

Comments
 (0)