Skip to content

Commit

Permalink
Lower case token type check
Browse files Browse the repository at this point in the history
Improve compatibility with ORCID by checking the response case-insensitively.

Co-authored-by: jeffersoncasimir <15801528+jeffersoncasimir@users.noreply.github.com>
  • Loading branch information
driusan and jeffersoncasimir committed Oct 31, 2023
1 parent 874e3cb commit cc9f570
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/oidc/php/callback.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down

0 comments on commit cc9f570

Please # to comment.