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

nbf claim validation should include clockTolerance #115

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

adamjmcgrath
Copy link
Contributor

Description

Pass clockTolerance option through to jose so that additional JWT date claims (like nbf) get validated with clock tolerance.

References

fixes #113

@adamjmcgrath adamjmcgrath requested a review from a team as a code owner October 6, 2023 13:42
@adamjmcgrath adamjmcgrath temporarily deployed to internal October 6, 2023 13:42 — with GitHub Actions Inactive
@adamjmcgrath adamjmcgrath temporarily deployed to internal October 6, 2023 13:42 — with GitHub Actions Inactive
@@ -3,6 +3,7 @@
import sinon from 'sinon';
import { createJwt, now } from './helpers';
import { jwtVerifier, InvalidTokenError } from '../src';
import validate from '../src/validate.js';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note test

Unused import validate.
@codecov-commenter
Copy link

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (ee0a1fc) 100.00% compared to head (128a564) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #115   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          340       340           
  Branches        99        99           
=========================================
  Hits           340       340           
Files Coverage Δ
packages/access-token-jwt/src/jwt-verifier.ts 100.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adamjmcgrath adamjmcgrath merged commit 993c1e2 into main Oct 9, 2023
9 checks passed
@adamjmcgrath adamjmcgrath deleted the nbf-clock-tolerance branch October 9, 2023 11:38
@adamjmcgrath adamjmcgrath mentioned this pull request Oct 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"nbf" claim timestamp check failed
3 participants