validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

Feat/addedISJWTExpiriation

Open P-1000 opened this issue 3 years ago • 1 comments

I have added a new function called isJWTExpiration. This function is designed to check if a JSON Web Token (JWT) has expired based on its "exp" (expiration) claim. It parses the JWT payload, extracts the "exp" claim, and compares it to the current timestamp to determine if the token has expired.

#2298

Checklist

  • [x] PR contains only changes related; no stray files, etc.
  • [ ] README updated (where applicable)
  • [ ] Tests written (where applicable)
  • [ ] References provided in PR (where applicable)

P-1000 avatar Oct 07 '23 08:10 P-1000

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (b958bd7) 99.95% compared to head (75e36d4) 99.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2315      +/-   ##
==========================================
- Coverage   99.95%   99.55%   -0.41%     
==========================================
  Files         107      108       +1     
  Lines        2454     2461       +7     
  Branches      619      621       +2     
==========================================
- Hits         2453     2450       -3     
- Misses          0       10      +10     
  Partials        1        1              
Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)
src/lib/isJWTExpiration.js 9.09% <9.09%> (ø)

... and 2 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 07 '23 08:10 codecov[bot]