unjwt 0.5.12 → 0.5.13

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { C as CompositeKey, d as ContentEncryptionAlgorithm, D as DeriveKeyOptions, c as DeriveKeyReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, m as JWK, E as JWKAlgorithm, F as JWKPEMAlgorithm, J as JWKParameters, n as JWKSet, v as JWK_AES_CBC_HMAC, w as JWK_AES_GCM, u as JWK_AES_GCM_KW, t as JWK_AES_KW, B as JWK_Asymmetric_Algorithm, h as JWK_EC, y as JWK_ECDH_ES, r as JWK_ECDSA, g as JWK_EC_Private, f as JWK_EC_Public, z as JWK_ED, o as JWK_HMAC, x as JWK_PBES2, k as JWK_RSA, s as JWK_RSA_ENC, q as JWK_RSA_PSS, j as JWK_RSA_Private, i as JWK_RSA_Public, p as JWK_RSA_SIGN, A as JWK_Symmetric_Algorithm, l as JWK_oct, L as JWT, M as JWTClaimValidationOptions, I as JWTClaims, H as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, e as WrapKeyResult } from './shared/unjwt.CN1C8TlR.mjs';
2
2
  export { J as JWSAlgorithm, a as JWSHeaderParameters, f as JWSKeyLookupFunction, b as JWSProtectedHeader, c as JWSSignOptions, e as JWSVerifyOptions, d as JWSVerifyResult, j as jws } from './shared/unjwt.BRtnm5sB.mjs';
3
3
  export { d as JWEDecryptOptions, e as JWEDecryptResult, b as JWEEncryptOptions, J as JWEHeaderParameters, c as JWEKeyLookupFunction, a as JWEKeyManagementHeaderParameters, j as jwe } from './shared/unjwt.B9sSOKE3.mjs';
4
- export { i as utils } from './shared/unjwt.df8yQ5_5.mjs';
4
+ export { i as utils } from './shared/unjwt.Cay_cOOI.mjs';
5
5
  export { j as jwk } from './shared/unjwt.DtVML6Qp.mjs';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- export { i as utils } from './shared/unjwt.Ce8yMcp_.mjs';
2
- export { j as jwe } from './shared/unjwt.DVMpKj8x.mjs';
3
- export { j as jwk } from './shared/unjwt.DuBBF25X.mjs';
4
- export { j as jws } from './shared/unjwt.D_JFPtpW.mjs';
5
- import './shared/unjwt.C_D0RMCp.mjs';
1
+ export { i as utils } from './shared/unjwt.mBSKL6g4.mjs';
2
+ export { j as jwe } from './shared/unjwt.UfthlTWt.mjs';
3
+ export { j as jwk } from './shared/unjwt.CX8WRx20.mjs';
4
+ export { j as jws } from './shared/unjwt.C6flzAeB.mjs';
5
+ import './shared/unjwt.DFAKwqBz.mjs';
package/dist/jwe.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import './shared/unjwt.DuBBF25X.mjs';
2
- import './shared/unjwt.Ce8yMcp_.mjs';
3
- export { d as decrypt, e as encrypt } from './shared/unjwt.DVMpKj8x.mjs';
4
- import './shared/unjwt.C_D0RMCp.mjs';
1
+ import './shared/unjwt.CX8WRx20.mjs';
2
+ import './shared/unjwt.mBSKL6g4.mjs';
3
+ export { d as decrypt, e as encrypt } from './shared/unjwt.UfthlTWt.mjs';
4
+ import './shared/unjwt.DFAKwqBz.mjs';
package/dist/jwk.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import './shared/unjwt.Ce8yMcp_.mjs';
2
- export { p as deriveKeyFromPassword, t as exportJWKToPEM, q as exportKey, o as generateKey, g as getJWKFromSet, s as importJWKFromPEM, i as importKey, m as unwrapKey, r as wrapKey } from './shared/unjwt.DuBBF25X.mjs';
1
+ import './shared/unjwt.mBSKL6g4.mjs';
2
+ export { p as deriveKeyFromPassword, t as exportJWKToPEM, q as exportKey, o as generateKey, g as getJWKFromSet, s as importJWKFromPEM, i as importKey, m as unwrapKey, r as wrapKey } from './shared/unjwt.CX8WRx20.mjs';
package/dist/jws.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import './shared/unjwt.DuBBF25X.mjs';
2
- import './shared/unjwt.Ce8yMcp_.mjs';
3
- import './shared/unjwt.C_D0RMCp.mjs';
4
- export { s as sign, v as verify } from './shared/unjwt.D_JFPtpW.mjs';
1
+ import './shared/unjwt.CX8WRx20.mjs';
2
+ import './shared/unjwt.mBSKL6g4.mjs';
3
+ import './shared/unjwt.DFAKwqBz.mjs';
4
+ export { s as sign, v as verify } from './shared/unjwt.C6flzAeB.mjs';
@@ -1,9 +1,12 @@
1
- import { i as importKey, g as getJWKFromSet } from './unjwt.DuBBF25X.mjs';
2
- import { a as isJWK, b as applyTypCtyDefaults, c as computeJwtTimeClaims, d as base64UrlEncode, t as textEncoder, e as textDecoder, f as base64UrlDecode, g as isJWKSet, h as decodePayloadFromB64UrlSegment, v as validateCriticalHeadersJWS, j as validateJwtClaims } from './unjwt.Ce8yMcp_.mjs';
3
- import { s as sign$1, v as verify$1 } from './unjwt.C_D0RMCp.mjs';
1
+ import { i as importKey, g as getJWKFromSet } from './unjwt.CX8WRx20.mjs';
2
+ import { s as sanitizeObject, a as isJWK, b as applyTypCtyDefaults, c as computeJwtTimeClaims, d as base64UrlEncode, t as textEncoder, e as textDecoder, f as base64UrlDecode, g as isJWKSet, h as decodePayloadFromB64UrlSegment, v as validateCriticalHeadersJWS, j as validateJwtClaims } from './unjwt.mBSKL6g4.mjs';
3
+ import { s as sign$1, v as verify$1 } from './unjwt.DFAKwqBz.mjs';
4
4
 
5
5
  async function sign(payload, key, options = {}) {
6
6
  const { protectedHeader: additionalProtectedHeader } = options;
7
+ const safeAdditionalHeader = sanitizeObject(
8
+ additionalProtectedHeader
9
+ );
7
10
  let { alg } = options;
8
11
  if (!alg) {
9
12
  if (isJWK(key) && key.alg) {
@@ -15,11 +18,11 @@ async function sign(payload, key, options = {}) {
15
18
  validateKeyLength(key, alg);
16
19
  const signingKey = await importKey(key, alg);
17
20
  const protectedHeader = {
18
- ...additionalProtectedHeader,
19
- ...isJWK(key) && key.kid ? { kid: additionalProtectedHeader?.kid || key.kid } : {},
21
+ ...safeAdditionalHeader,
22
+ ...isJWK(key) && key.kid ? { kid: safeAdditionalHeader?.kid || key.kid } : {},
20
23
  // Include kid if available
21
24
  alg,
22
- typ: additionalProtectedHeader?.typ
25
+ typ: safeAdditionalHeader?.typ
23
26
  };
24
27
  applyTypCtyDefaults(protectedHeader, payload);
25
28
  if (protectedHeader.b64 === true) {
@@ -64,7 +67,9 @@ async function verify(jws, key, options = {}) {
64
67
  let protectedHeader;
65
68
  try {
66
69
  const protectedHeaderString = base64UrlDecode(protectedHeaderEncoded);
67
- protectedHeader = JSON.parse(protectedHeaderString);
70
+ protectedHeader = sanitizeObject(
71
+ JSON.parse(protectedHeaderString)
72
+ );
68
73
  } catch (error_) {
69
74
  throw new Error(
70
75
  `Invalid JWS: Protected header is not valid Base64URL or JSON (${error_ instanceof Error ? error_.message : error_})`
@@ -1,4 +1,4 @@
1
- import { m as isCryptoKey, k as concatUint8Arrays, d as base64UrlEncode, q as base64Decode, s as base64Encode, t as textEncoder, r as randomBytes, a as isJWK, f as base64UrlDecode, g as isJWKSet } from './unjwt.Ce8yMcp_.mjs';
1
+ import { m as isCryptoKey, k as concatUint8Arrays, d as base64UrlEncode, q as base64Decode, u as base64Encode, s as sanitizeObject, t as textEncoder, r as randomBytes, a as isJWK, f as base64UrlDecode, g as isJWKSet } from './unjwt.mBSKL6g4.mjs';
2
2
 
3
3
  /**
4
4
  * This is a fork of Jose library's utility functions.
@@ -882,7 +882,7 @@ async function jwkTokey(jwk) {
882
882
  );
883
883
  }
884
884
  const { algorithm, keyUsages } = subtleMapping(jwk);
885
- const keyData = { ...jwk };
885
+ const keyData = { ...sanitizeObject(jwk) };
886
886
  delete keyData.alg;
887
887
  delete keyData.use;
888
888
  return crypto.subtle.importKey(
@@ -1098,15 +1098,19 @@ async function importKey(key, alg) {
1098
1098
  return key;
1099
1099
  }
1100
1100
  if (isJWK(key)) {
1101
- if ("k" in key && typeof key.k === "string") {
1102
- return base64UrlDecode(key.k, false);
1101
+ const safeJwk = sanitizeObject(key);
1102
+ if ("k" in safeJwk && typeof safeJwk.k === "string") {
1103
+ return base64UrlDecode(safeJwk.k, false);
1103
1104
  } else {
1104
- if (!key.alg && !alg) {
1105
+ if (!safeJwk.alg && !alg) {
1105
1106
  throw new TypeError(
1106
1107
  "Algorithm must be provided when importing non-oct JWK"
1107
1108
  );
1108
1109
  }
1109
- return jwkTokey({ ...key, alg: key.alg || alg });
1110
+ return jwkTokey({
1111
+ ...safeJwk,
1112
+ alg: safeJwk.alg || alg
1113
+ });
1110
1114
  }
1111
1115
  }
1112
1116
  throw new Error("Invalid key type provided to importKey");
@@ -1114,7 +1118,7 @@ async function importKey(key, alg) {
1114
1118
  async function exportKey(key, jwk) {
1115
1119
  const exportedJwk = await keyToJWK(key);
1116
1120
  if (jwk) {
1117
- return { ...exportedJwk, ...jwk };
1121
+ return { ...exportedJwk, ...sanitizeObject(jwk) };
1118
1122
  }
1119
1123
  return exportedJwk;
1120
1124
  }
@@ -50,6 +50,19 @@ declare function validateCriticalHeadersJWE(protectedHeader: {
50
50
  crit?: string[];
51
51
  } & Record<string, any>, understoodFromOptions?: string[]): void;
52
52
 
53
+ /**
54
+ * Forked from unsecure@0.0.4
55
+ * Licensed under the MIT License.
56
+ *
57
+ * Source: https://github.com/sandros94/unsecure/blob/913ed5580c551153a19154b4916c67a8efb2be85/src/sanitize.ts
58
+ */
59
+ /**
60
+ * Remove prototype-pollution vectors from a plain record in-place.
61
+ * This strips __proto__, prototype, and constructor own properties.
62
+ * Returns the same reference for convenience.
63
+ */
64
+ declare function sanitizeObject<T extends Record<string, unknown> | undefined>(obj: T): T;
65
+
53
66
  declare const textEncoder: TextEncoder;
54
67
  declare const textDecoder: TextDecoder;
55
68
  declare function base64Encode(data: Uint8Array<ArrayBuffer> | string): string;
@@ -91,6 +104,7 @@ declare const index_isJWKSet: typeof isJWKSet;
91
104
  declare const index_isJsonContent: typeof isJsonContent;
92
105
  declare const index_maybeArray: typeof maybeArray;
93
106
  declare const index_randomBytes: typeof randomBytes;
107
+ declare const index_sanitizeObject: typeof sanitizeObject;
94
108
  declare const index_textDecoder: typeof textDecoder;
95
109
  declare const index_textEncoder: typeof textEncoder;
96
110
  declare const index_validateCriticalHeadersJWE: typeof validateCriticalHeadersJWE;
@@ -117,6 +131,7 @@ declare namespace index {
117
131
  index_isJsonContent as isJsonContent,
118
132
  index_maybeArray as maybeArray,
119
133
  index_randomBytes as randomBytes,
134
+ index_sanitizeObject as sanitizeObject,
120
135
  index_textDecoder as textDecoder,
121
136
  index_textEncoder as textEncoder,
122
137
  index_validateCriticalHeadersJWE as validateCriticalHeadersJWE,
@@ -125,4 +140,4 @@ declare namespace index {
125
140
  };
126
141
  }
127
142
 
128
- export { textDecoder as a, base64Encode as b, base64UrlEncode as c, base64Decode as d, base64UrlDecode as e, concatUint8Arrays as f, isJWK as g, isJWKSet as h, index as i, assertCryptoKey as j, isCryptoKey as k, isCryptoKeyPair as l, maybeArray as m, applyTypCtyDefaults as n, isJsonContent as o, decodeMaybeJsonString as p, decodePayloadFromBytes as q, randomBytes as r, decodePayloadFromB64UrlSegment as s, textEncoder as t, getPlaintextBytes as u, computeJwtTimeClaims as v, validateJwtClaims as w, validateCriticalHeadersJWS as x, validateCriticalHeadersJWE as y };
143
+ export { textDecoder as a, base64Encode as b, base64UrlEncode as c, base64Decode as d, base64UrlDecode as e, concatUint8Arrays as f, isJWK as g, isJWKSet as h, index as i, assertCryptoKey as j, isCryptoKey as k, isCryptoKeyPair as l, maybeArray as m, applyTypCtyDefaults as n, isJsonContent as o, decodeMaybeJsonString as p, decodePayloadFromBytes as q, randomBytes as r, decodePayloadFromB64UrlSegment as s, textEncoder as t, getPlaintextBytes as u, computeJwtTimeClaims as v, validateJwtClaims as w, validateCriticalHeadersJWS as x, validateCriticalHeadersJWE as y, sanitizeObject as z };
@@ -1,4 +1,4 @@
1
- import { c as checkSigCryptoKey } from './unjwt.DuBBF25X.mjs';
1
+ import { c as checkSigCryptoKey } from './unjwt.CX8WRx20.mjs';
2
2
 
3
3
  /**
4
4
  * This is a fork of Jose library's utility functions.
@@ -1,6 +1,6 @@
1
- import { a as checkEncCryptoKey, u as uint32be, b as generateCEK, e as encryptIV, w as wrap, k as keyToJWK, d as bitLengthCEK, f as jwkTokey, i as importKey, h as generateIV, l as encrypt$1, m as unwrapKey, n as decrypt$1 } from './unjwt.DuBBF25X.mjs';
2
- import { k as concatUint8Arrays, t as textEncoder, l as assertCryptoKey, d as base64UrlEncode, m as isCryptoKey, a as isJWK, f as base64UrlDecode, r as randomBytes, b as applyTypCtyDefaults, c as computeJwtTimeClaims, n as getPlaintextBytes, o as decodePayloadFromBytes, p as validateCriticalHeadersJWE } from './unjwt.Ce8yMcp_.mjs';
3
- import { c as checkKeyLength } from './unjwt.C_D0RMCp.mjs';
1
+ import { a as checkEncCryptoKey, u as uint32be, b as generateCEK, e as encryptIV, w as wrap, k as keyToJWK, d as bitLengthCEK, f as jwkTokey, i as importKey, h as generateIV, l as encrypt$1, m as unwrapKey, n as decrypt$1 } from './unjwt.CX8WRx20.mjs';
2
+ import { k as concatUint8Arrays, t as textEncoder, l as assertCryptoKey, d as base64UrlEncode, m as isCryptoKey, a as isJWK, s as sanitizeObject, f as base64UrlDecode, r as randomBytes, b as applyTypCtyDefaults, c as computeJwtTimeClaims, n as getPlaintextBytes, o as decodePayloadFromBytes, p as validateCriticalHeadersJWE } from './unjwt.mBSKL6g4.mjs';
3
+ import { c as checkKeyLength } from './unjwt.DFAKwqBz.mjs';
4
4
 
5
5
  function lengthAndInput(input) {
6
6
  return concatUint8Arrays(uint32be(input.length), input);
@@ -183,10 +183,11 @@ async function normalizeKey(key, alg) {
183
183
  return key;
184
184
  }
185
185
  if (isJWK(key)) {
186
- if ("k" in key && key.k) {
187
- return base64UrlDecode(key.k, false);
186
+ const safeJwk = sanitizeObject(key);
187
+ if ("k" in safeJwk && safeJwk.k) {
188
+ return base64UrlDecode(safeJwk.k, false);
188
189
  }
189
- return jwkTokey({ ...key, alg });
190
+ return jwkTokey({ ...safeJwk, alg });
190
191
  }
191
192
  throw new Error("unreachable");
192
193
  }
@@ -245,12 +246,12 @@ async function encrypt(payload, key, options = {}) {
245
246
  const baseProtectedHeader = { ...additionalProtectedHeader };
246
247
  delete baseProtectedHeader.alg;
247
248
  delete baseProtectedHeader.enc;
248
- const jweProtectedHeader = {
249
+ const jweProtectedHeader = sanitizeObject({
249
250
  ...baseProtectedHeader,
250
251
  ...keyManagementHeaderParams,
251
252
  alg,
252
253
  enc
253
- };
254
+ });
254
255
  const protectedHeader = applyTypCtyDefaults(jweProtectedHeader, payload);
255
256
  const computedPayload = computeJwtTimeClaims(
256
257
  payload,
@@ -309,7 +310,9 @@ async function decrypt(jwe, key, options) {
309
310
  let protectedHeader;
310
311
  try {
311
312
  const protectedHeaderJson = base64UrlDecode(protectedHeaderEncoded);
312
- protectedHeader = JSON.parse(protectedHeaderJson);
313
+ protectedHeader = sanitizeObject(
314
+ JSON.parse(protectedHeaderJson)
315
+ );
313
316
  } catch (error_) {
314
317
  throw new Error(
315
318
  `Invalid JWE: Protected header is not valid Base64URL or JSON (${error_ instanceof Error ? error_.message : error_})`
@@ -20,7 +20,8 @@ function decodeMaybeJsonString(decodedString, header) {
20
20
  const looksLikeJson = decodedString.startsWith("{") && decodedString.endsWith("}") || decodedString.startsWith("[") && decodedString.endsWith("]");
21
21
  if (looksLikeJson) {
22
22
  try {
23
- return JSON.parse(decodedString);
23
+ const obj = JSON.parse(decodedString);
24
+ return sanitizeObject(obj);
24
25
  } catch {
25
26
  }
26
27
  }
@@ -193,6 +194,55 @@ function validateCriticalHeadersJWE(protectedHeader, understoodFromOptions) {
193
194
  }
194
195
  }
195
196
 
197
+ const DANGEROUS_KEYS = ["__proto__", "prototype", "constructor"];
198
+ function sanitizeObject(obj) {
199
+ if (!obj || typeof obj !== "object") return obj;
200
+ const seen = /* @__PURE__ */ new WeakSet();
201
+ visit(obj, seen);
202
+ return obj;
203
+ }
204
+ function visit(current, seen) {
205
+ if (!current || typeof current !== "object") return;
206
+ if (seen.has(current)) return;
207
+ seen.add(current);
208
+ for (const key of DANGEROUS_KEYS) {
209
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
210
+ try {
211
+ delete current[key];
212
+ } catch {
213
+ }
214
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
215
+ try {
216
+ current[key] = void 0;
217
+ delete current[key];
218
+ } catch {
219
+ }
220
+ }
221
+ if (Object.prototype.hasOwnProperty.call(current, key)) {
222
+ try {
223
+ Object.defineProperty(current, key, {
224
+ value: void 0,
225
+ configurable: true,
226
+ enumerable: false,
227
+ writable: true
228
+ });
229
+ delete current[key];
230
+ } catch {
231
+ }
232
+ }
233
+ }
234
+ }
235
+ delete current["__proto__"];
236
+ delete current["prototype"];
237
+ delete current["constructor"];
238
+ if (Array.isArray(current)) {
239
+ for (const value of current) visit(value, seen);
240
+ return;
241
+ }
242
+ for (const k of Object.keys(current))
243
+ visit(current[k], seen);
244
+ }
245
+
196
246
  const textEncoder = /* @__PURE__ */ new TextEncoder();
197
247
  const textDecoder = /* @__PURE__ */ new TextDecoder();
198
248
  function base64Encode(data) {
@@ -288,6 +338,7 @@ const index = {
288
338
  isJsonContent: isJsonContent,
289
339
  maybeArray: maybeArray,
290
340
  randomBytes: randomBytes,
341
+ sanitizeObject: sanitizeObject,
291
342
  textDecoder: textDecoder,
292
343
  textEncoder: textEncoder,
293
344
  validateCriticalHeadersJWE: validateCriticalHeadersJWE,
@@ -295,4 +346,4 @@ const index = {
295
346
  validateJwtClaims: validateJwtClaims
296
347
  };
297
348
 
298
- export { isJWK as a, applyTypCtyDefaults as b, computeJwtTimeClaims as c, base64UrlEncode as d, textDecoder as e, base64UrlDecode as f, isJWKSet as g, decodePayloadFromB64UrlSegment as h, index as i, validateJwtClaims as j, concatUint8Arrays as k, assertCryptoKey as l, isCryptoKey as m, getPlaintextBytes as n, decodePayloadFromBytes as o, validateCriticalHeadersJWE as p, base64Decode as q, randomBytes as r, base64Encode as s, textEncoder as t, maybeArray as u, validateCriticalHeadersJWS as v, isCryptoKeyPair as w, isJsonContent as x, decodeMaybeJsonString as y };
349
+ export { isJWK as a, applyTypCtyDefaults as b, computeJwtTimeClaims as c, base64UrlEncode as d, textDecoder as e, base64UrlDecode as f, isJWKSet as g, decodePayloadFromB64UrlSegment as h, index as i, validateJwtClaims as j, concatUint8Arrays as k, assertCryptoKey as l, isCryptoKey as m, getPlaintextBytes as n, decodePayloadFromBytes as o, validateCriticalHeadersJWE as p, base64Decode as q, randomBytes as r, sanitizeObject as s, textEncoder as t, base64Encode as u, validateCriticalHeadersJWS as v, maybeArray as w, isCryptoKeyPair as x, isJsonContent as y, decodeMaybeJsonString as z };
package/dist/utils.d.mts CHANGED
@@ -1,2 +1,2 @@
1
1
  import './shared/unjwt.CN1C8TlR.mjs';
2
- export { n as applyTypCtyDefaults, j as assertCryptoKey, d as base64Decode, b as base64Encode, e as base64UrlDecode, c as base64UrlEncode, v as computeJwtTimeClaims, f as concatUint8Arrays, p as decodeMaybeJsonString, s as decodePayloadFromB64UrlSegment, q as decodePayloadFromBytes, u as getPlaintextBytes, k as isCryptoKey, l as isCryptoKeyPair, g as isJWK, h as isJWKSet, o as isJsonContent, m as maybeArray, r as randomBytes, a as textDecoder, t as textEncoder, y as validateCriticalHeadersJWE, x as validateCriticalHeadersJWS, w as validateJwtClaims } from './shared/unjwt.df8yQ5_5.mjs';
2
+ export { n as applyTypCtyDefaults, j as assertCryptoKey, d as base64Decode, b as base64Encode, e as base64UrlDecode, c as base64UrlEncode, v as computeJwtTimeClaims, f as concatUint8Arrays, p as decodeMaybeJsonString, s as decodePayloadFromB64UrlSegment, q as decodePayloadFromBytes, u as getPlaintextBytes, k as isCryptoKey, l as isCryptoKeyPair, g as isJWK, h as isJWKSet, o as isJsonContent, m as maybeArray, r as randomBytes, z as sanitizeObject, a as textDecoder, t as textEncoder, y as validateCriticalHeadersJWE, x as validateCriticalHeadersJWS, w as validateJwtClaims } from './shared/unjwt.Cay_cOOI.mjs';
package/dist/utils.mjs CHANGED
@@ -1 +1 @@
1
- export { b as applyTypCtyDefaults, l as assertCryptoKey, q as base64Decode, s as base64Encode, f as base64UrlDecode, d as base64UrlEncode, c as computeJwtTimeClaims, k as concatUint8Arrays, y as decodeMaybeJsonString, h as decodePayloadFromB64UrlSegment, o as decodePayloadFromBytes, n as getPlaintextBytes, m as isCryptoKey, w as isCryptoKeyPair, a as isJWK, g as isJWKSet, x as isJsonContent, u as maybeArray, r as randomBytes, e as textDecoder, t as textEncoder, p as validateCriticalHeadersJWE, v as validateCriticalHeadersJWS, j as validateJwtClaims } from './shared/unjwt.Ce8yMcp_.mjs';
1
+ export { b as applyTypCtyDefaults, l as assertCryptoKey, q as base64Decode, u as base64Encode, f as base64UrlDecode, d as base64UrlEncode, c as computeJwtTimeClaims, k as concatUint8Arrays, z as decodeMaybeJsonString, h as decodePayloadFromB64UrlSegment, o as decodePayloadFromBytes, n as getPlaintextBytes, m as isCryptoKey, x as isCryptoKeyPair, a as isJWK, g as isJWKSet, y as isJsonContent, w as maybeArray, r as randomBytes, s as sanitizeObject, e as textDecoder, t as textEncoder, p as validateCriticalHeadersJWE, v as validateCriticalHeadersJWS, j as validateJwtClaims } from './shared/unjwt.mBSKL6g4.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unjwt",
3
- "version": "0.5.12",
3
+ "version": "0.5.13",
4
4
  "description": "Low-level JWT utilities",
5
5
  "repository": "sandros94/unjwt",
6
6
  "license": "MIT",