MCPcopy
hub / github.com/panva/jose / numericDateNumber

Function numericDateNumber

test/jwt/decrypt.test.ts:292–301  ·  view source on GitHub ↗
(t, claim)

Source from the content-addressed store, hash-verified

290})
291
292async function numericDateNumber(t, claim) {
293 const jwt = await new EncryptJWT({ [claim]: null })
294 .setProtectedHeader({ alg: 'dir', enc: 'A256GCM' })
295 .encrypt(t.context.secret)
296
297 await t.throwsAsync(jwtDecrypt(jwt, t.context.secret), {
298 code: 'ERR_JWT_CLAIM_VALIDATION_FAILED',
299 message: `"${claim}" claim must be a number`,
300 })
301}
302numericDateNumber.title = (t, claim) => `${claim} must be a number`
303
304test('clockTolerance num', async (t) => {

Callers

nothing calls this directly

Calls 3

jwtDecryptFunction · 0.85
encryptMethod · 0.65
setProtectedHeaderMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…