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

port: [#4432] Expired JWT token exception not being handled (#6572) #4436

Merged
merged 3 commits into from
May 5, 2023

Conversation

ceciliaavila
Copy link
Collaborator

Fixes #4432

Description

This PR ports the changes in the PR#6572 to handle expired tokens and return a most accurate error message.

Specific Changes

  • Added catch block in jwtTokenExtractor for TokenExpiredErrors.
  • Added a unit test in jwtTokenExtractor.test.js to cover the new code.
  • Added a unit test in cloudAdapter.test.js to verify the exception is properly thrown.

Testing

These images show the exception being displayed to the user in Emulator and the new unit tests passing.
image

image

@ceciliaavila ceciliaavila requested a review from a team as a code owner February 17, 2023 14:19
@coveralls
Copy link

coveralls commented Feb 17, 2023

Pull Request Test Coverage Report for Build 4204595324

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 84.763%

Totals Coverage Status
Change from base Build 4198805038: 0.1%
Covered Lines: 20034
Relevant Lines: 22407

💛 - Coveralls

@tracyboehrer tracyboehrer merged commit 3fe6730 into main May 5, 2023
@tracyboehrer tracyboehrer deleted the southworks/add/expired-token-exception branch May 5, 2023 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

port: [#6563] Expired JWT token exception not being handled (#6572)
3 participants