Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
0c8f476751
|
|||
|
3c5d178fec
|
4
index.js
4
index.js
@@ -95,9 +95,9 @@ class JWT {
|
||||
if (!importAlgorithm)
|
||||
throw new Error('algorithm not found')
|
||||
const payload = this.decode(token)
|
||||
if (payload.nbf && payload.nbf >= Math.floor(Date.now() / 1000))
|
||||
if (payload.nbf && payload.nbf > Math.floor(Date.now() / 1000))
|
||||
return false
|
||||
if (payload.exp && payload.exp < Math.floor(Date.now() / 1000))
|
||||
if (payload.exp && payload.exp <= Math.floor(Date.now() / 1000))
|
||||
return false
|
||||
let keyFormat = 'raw'
|
||||
let keyData
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tsndr/cloudflare-worker-jwt",
|
||||
"version": "1.1.6",
|
||||
"version": "1.1.7",
|
||||
"description": "A lightweight JWT implementation with ZERO dependencies for Cloudflare Worker",
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user