From cc9f5702871f1753e6500595e4fe6cce975190dd Mon Sep 17 00:00:00 2001 From: Dave MacFarlane Date: Tue, 31 Oct 2023 11:59:51 -0400 Subject: [PATCH] Lower case token type check Improve compatibility with ORCID by checking the response case-insensitively. Co-authored-by: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com> --- modules/oidc/php/callback.class.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/oidc/php/callback.class.inc b/modules/oidc/php/callback.class.inc index af43652b269..b38b59f3e64 100644 --- a/modules/oidc/php/callback.class.inc +++ b/modules/oidc/php/callback.class.inc @@ -221,7 +221,7 @@ class Callback extends \NDB_Page } // We don't actually care about this but it implies that something // went wrong. - if ($respjson['token_type'] !== 'Bearer') { + if (strtolower($respjson['token_type']) !== 'bearer') { return null; } if (empty($respjson['access_token'])) {