-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #46 #50
base: main
Are you sure you want to change the base?
Fix #46 #50
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -47,7 +47,8 @@ public function __construct(array $keys, array $options = []) | |||||||||||||||||||||||||
try { | ||||||||||||||||||||||||||
$decoded = JWT::decode($options['id_token'], $key); | ||||||||||||||||||||||||||
} catch (\UnexpectedValueException $e) { | ||||||||||||||||||||||||||
$decoded = JWT::decode($options['id_token'], $key, ['RS256']); | ||||||||||||||||||||||||||
$headers = (object) ["alg" => 'RS256']; | ||||||||||||||||||||||||||
$decoded = JWT::decode($options['id_token'], $key, $headers); | ||||||||||||||||||||||||||
Comment on lines
+50
to
+51
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Third parameter of the
Proposed changes are valid for current version of
Suggested change
Couldn't think of any other way to ensure backwards compatibility with PHP 5.6, since this library test suite includes PHP 5.6. Tested with:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just ran into the same issue. This solution should pass the tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the tests are passing there is nothing against to merge it. Thats right. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@patrickbussmann I tried in #54 - locally unit tests seem to work There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can see the tests here because locally your version is different. The tests here check multiple PHP versions 👍 still failing for lowest setup. Maybe we can adjust something to passing here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @patrickbussmann i see only a coding standard failure in https://github.com/patrickbussmann/oauth2-apple/actions/runs/8357382263 - should be fixed now in #54 |
||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||
break; | ||||||||||||||||||||||||||
} catch (\Exception $exception) { | ||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 3rd parameter should not be there cause method had previously only two parameters