@cfworker/jwt 4.0.0 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jwks.js CHANGED
@@ -33,7 +33,7 @@ export async function importKey(iss, jwk) {
33
33
  importedKeys[iss][jwk.kid ?? 'default'] = key;
34
34
  }
35
35
  export async function getKey(decoded) {
36
- let { header: { kid = 'default' }, payload: { iss } } = decoded;
36
+ const { header: { kid = 'default' }, payload: { iss } } = decoded;
37
37
  if (!importedKeys[iss]) {
38
38
  const jwks = await getJwks(iss);
39
39
  await Promise.all(jwks.keys.map(jwk => importKey(iss, jwk)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cfworker/jwt",
3
- "version": "4.0.0",
3
+ "version": "4.0.3",
4
4
  "description": "Tiny lib for decoding JWTs and verifying signatures, using native crypto APIs",
5
5
  "keywords": [
6
6
  "jwt",
@@ -34,16 +34,16 @@
34
34
  "test": "cfworker test test/**/*.spec.ts --nocheck"
35
35
  },
36
36
  "dependencies": {
37
- "@cfworker/worker-types": "^1.12.1",
37
+ "@cfworker/worker-types": "^1.12.2",
38
38
  "@cloudflare/workers-types": "^2.2.2",
39
- "rfc4648": "^1.5.1"
39
+ "rfc4648": "^1.5.2"
40
40
  },
41
41
  "devDependencies": {
42
- "@cfworker/dev": "^1.14.0",
43
- "@types/chai": "^4.3.0",
44
- "@types/mocha": "^9.1.0",
42
+ "@cfworker/dev": "^1.14.1",
43
+ "@types/chai": "^4.3.3",
44
+ "@types/mocha": "^9.1.1",
45
45
  "chai": "^4.3.6",
46
- "mocha": "^9.2.1",
47
- "typescript": "^4.5.5"
46
+ "mocha": "^10.0.0",
47
+ "typescript": "^4.7.4"
48
48
  }
49
49
  }
package/src/jwks.ts CHANGED
@@ -69,7 +69,7 @@ export async function importKey(iss: string, jwk: JsonWebKey) {
69
69
  * Get the CryptoKey associated with the JWT's issuer.
70
70
  */
71
71
  export async function getKey(decoded: DecodedJwt): Promise<CryptoKey> {
72
- let {
72
+ const {
73
73
  header: { kid = 'default' },
74
74
  payload: { iss }
75
75
  } = decoded;