Skip to content
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

Update JWT library #576

Merged
merged 2 commits into from
Oct 31, 2018
Merged

Update JWT library #576

merged 2 commits into from
Oct 31, 2018

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Oct 29, 2018

Changes

  • Update Firebase JWT library from v2.0.0 to v5.0.0 and removed extra library files (tests, meta, etc)
  • Remove fallback to /userinfo, replace with ID token
  • Move ID token cleanup to new WP_Auth0_LoginManager::clean_id_token()
  • Add InvalidArgumentException catching in WP_Auth0_LoginManager::init_auth0()
  • Remove exception handling in WP_Auth0_LoginManager::implicit_login() (handled in calling method)
  • Add a higher leeway
  • Update autoloader for new path

References

Testing

No testing is in place for the login flow as it's highly coupled.

@codecov-io
Copy link

codecov-io commented Oct 29, 2018

Codecov Report

Merging #576 into master will increase coverage by 0.06%.
The diff coverage is 9.09%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #576      +/-   ##
============================================
+ Coverage     21.27%   21.33%   +0.06%     
+ Complexity     1313     1309       -4     
============================================
  Files            51       51              
  Lines          4278     4265      -13     
============================================
  Hits            910      910              
+ Misses         3368     3355      -13
Impacted Files Coverage Δ Complexity Δ
lib/WP_Auth0_LoginManager.php 10.11% <0%> (+0.31%) 120 <0> (-4) ⬇️
WP_Auth0.php 21.72% <100%> (+0.17%) 64 <0> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c86a691...1f389de. Read the comment docs.

$userinfo_resp_code
);
}
// Management API call failed, fallback to ID token.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the expectation for a management API call to fail?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Client Credential Grant is turned off

@cocojoe
Copy link
Member

cocojoe commented Oct 31, 2018

Code is mostly the JWT Lib changes, thanks for adding you changed leeway as it's hard to tell if you changed anything vs changes that came from the update. That's a big jump in Majors from 2.0 to 5.0.

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@cocojoe cocojoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@joshcanhelp joshcanhelp merged commit dae7de4 into master Oct 31, 2018
@joshcanhelp joshcanhelp deleted the update-jwt-library branch October 31, 2018 15:10
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants