unjwt 0.5.13 → 0.5.14

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
- 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
- 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
- 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.Cay_cOOI.mjs';
5
- export { j as jwk } from './shared/unjwt.DtVML6Qp.mjs';
1
+ export { C as CompositeKey, d as ContentEncryptionAlgorithm, D as DeriveKeyOptions, c as DeriveKeyReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, r as JWK, M as JWKAlgorithm, N as JWKPEMAlgorithm, J as JWKParameters, s as JWKSet, A as JWK_AES_CBC_HMAC, B as JWK_AES_GCM, z as JWK_AES_GCM_KW, y as JWK_AES_KW, L as JWK_Asymmetric_Algorithm, h as JWK_EC, F as JWK_ECDH_ES, w as JWK_ECDSA, g as JWK_EC_Private, f as JWK_EC_Public, t as JWK_HMAC, n as JWK_OKP, m as JWK_OKP_Private, l as JWK_OKP_Public, H as JWK_OKP_SIGN, E as JWK_PBES2, q as JWK_Private, p as JWK_Public, k as JWK_RSA, x as JWK_RSA_ENC, v as JWK_RSA_PSS, j as JWK_RSA_Private, i as JWK_RSA_Public, u as JWK_RSA_SIGN, I as JWK_Symmetric_Algorithm, o as JWK_oct, Q as JWT, R as JWTClaimValidationOptions, P as JWTClaims, O as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, e as WrapKeyResult } from './shared/unjwt.BsgIQHVD.mjs';
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.qWts1U9J.mjs';
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.Cf7vmOhS.mjs';
4
+ export { i as utils } from './shared/unjwt.BYaxDvLV.mjs';
5
+ export { j as jwk } from './shared/unjwt.C6b_GyXm.mjs';
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
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';
1
+ export { i as utils } from './shared/unjwt.BEjwP_9W.mjs';
2
+ export { j as jwe } from './shared/unjwt.B8wnSUll.mjs';
3
+ export { j as jwk } from './shared/unjwt.BVlHlXdP.mjs';
4
+ export { j as jws } from './shared/unjwt.skuKf53c.mjs';
5
+ import './shared/unjwt.BaB7HUR1.mjs';
package/dist/jwe.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { L as JWT, M as JWTClaimValidationOptions, I as JWTClaims, H as JoseHeaderParameters } from './shared/unjwt.CN1C8TlR.mjs';
2
- export { d as JWEDecryptOptions, e as JWEDecryptResult, b as JWEEncryptOptions, J as JWEHeaderParameters, c as JWEKeyLookupFunction, a as JWEKeyManagementHeaderParameters, g as decrypt, f as encrypt } from './shared/unjwt.B9sSOKE3.mjs';
1
+ export { Q as JWT, R as JWTClaimValidationOptions, P as JWTClaims, O as JoseHeaderParameters } from './shared/unjwt.BsgIQHVD.mjs';
2
+ export { d as JWEDecryptOptions, e as JWEDecryptResult, b as JWEEncryptOptions, J as JWEHeaderParameters, c as JWEKeyLookupFunction, a as JWEKeyManagementHeaderParameters, g as decrypt, f as encrypt } from './shared/unjwt.Cf7vmOhS.mjs';
package/dist/jwe.mjs CHANGED
@@ -1,4 +1,4 @@
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';
1
+ import './shared/unjwt.BVlHlXdP.mjs';
2
+ import './shared/unjwt.BEjwP_9W.mjs';
3
+ export { d as decrypt, e as encrypt } from './shared/unjwt.B8wnSUll.mjs';
4
+ import './shared/unjwt.BaB7HUR1.mjs';
package/dist/jwk.d.mts CHANGED
@@ -1,2 +1,2 @@
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
- export { d as deriveKeyFromPassword, b as exportJWKToPEM, e as exportKey, g as generateKey, c as getJWKFromSet, a as importJWKFromPEM, i as importKey, u as unwrapKey, w as wrapKey } from './shared/unjwt.DtVML6Qp.mjs';
1
+ export { C as CompositeKey, d as ContentEncryptionAlgorithm, D as DeriveKeyOptions, c as DeriveKeyReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, r as JWK, M as JWKAlgorithm, N as JWKPEMAlgorithm, J as JWKParameters, s as JWKSet, A as JWK_AES_CBC_HMAC, B as JWK_AES_GCM, z as JWK_AES_GCM_KW, y as JWK_AES_KW, L as JWK_Asymmetric_Algorithm, h as JWK_EC, F as JWK_ECDH_ES, w as JWK_ECDSA, g as JWK_EC_Private, f as JWK_EC_Public, t as JWK_HMAC, n as JWK_OKP, m as JWK_OKP_Private, l as JWK_OKP_Public, H as JWK_OKP_SIGN, E as JWK_PBES2, q as JWK_Private, p as JWK_Public, k as JWK_RSA, x as JWK_RSA_ENC, v as JWK_RSA_PSS, j as JWK_RSA_Private, i as JWK_RSA_Public, u as JWK_RSA_SIGN, I as JWK_Symmetric_Algorithm, o as JWK_oct, Q as JWT, R as JWTClaimValidationOptions, P as JWTClaims, O as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, e as WrapKeyResult } from './shared/unjwt.BsgIQHVD.mjs';
2
+ export { d as deriveKeyFromPassword, b as exportJWKToPEM, e as exportKey, g as generateKey, c as getJWKFromSet, a as importJWKFromPEM, i as importKey, u as unwrapKey, w as wrapKey } from './shared/unjwt.C6b_GyXm.mjs';
package/dist/jwk.mjs CHANGED
@@ -1,2 +1,2 @@
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';
1
+ import './shared/unjwt.BEjwP_9W.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.BVlHlXdP.mjs';
package/dist/jws.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { L as JWT, M as JWTClaimValidationOptions, I as JWTClaims, H as JoseHeaderParameters } from './shared/unjwt.CN1C8TlR.mjs';
2
- export { J as JWSAlgorithm, a as JWSHeaderParameters, f as JWSKeyLookupFunction, b as JWSProtectedHeader, c as JWSSignOptions, e as JWSVerifyOptions, d as JWSVerifyResult, s as sign, v as verify } from './shared/unjwt.BRtnm5sB.mjs';
1
+ export { Q as JWT, R as JWTClaimValidationOptions, P as JWTClaims, O as JoseHeaderParameters } from './shared/unjwt.BsgIQHVD.mjs';
2
+ export { J as JWSAlgorithm, a as JWSHeaderParameters, f as JWSKeyLookupFunction, b as JWSProtectedHeader, c as JWSSignOptions, e as JWSVerifyOptions, d as JWSVerifyResult, s as sign, v as verify } from './shared/unjwt.qWts1U9J.mjs';
package/dist/jws.mjs CHANGED
@@ -1,4 +1,4 @@
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
+ import './shared/unjwt.BVlHlXdP.mjs';
2
+ import './shared/unjwt.BEjwP_9W.mjs';
3
+ import './shared/unjwt.BaB7HUR1.mjs';
4
+ export { s as sign, v as verify } from './shared/unjwt.skuKf53c.mjs';
@@ -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.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';
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.BVlHlXdP.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.BEjwP_9W.mjs';
3
+ import { c as checkKeyLength } from './unjwt.BaB7HUR1.mjs';
4
4
 
5
5
  function lengthAndInput(input) {
6
6
  return concatUint8Arrays(uint32be(input.length), input);
@@ -316,6 +316,41 @@ function isCryptoKey(key) {
316
316
  return key?.[Symbol.toStringTag] === "CryptoKey";
317
317
  }
318
318
  const isCryptoKeyPair = (key) => key && typeof key === "object" && isCryptoKey(key.publicKey) && isCryptoKey(key.privateKey);
319
+ function isSymmetricJWK(key) {
320
+ return isJWK(key) && key.kty === "oct" && typeof key.k === "string";
321
+ }
322
+ function isAsymmetricJWK(key) {
323
+ return !isSymmetricJWK(key);
324
+ }
325
+ function isPrivateJWK(key) {
326
+ if (!isJWK(key)) return false;
327
+ if (key.kty === "EC") {
328
+ return typeof key.d === "string";
329
+ }
330
+ if (key.kty === "OKP") {
331
+ return typeof key.d === "string";
332
+ }
333
+ if (key.kty === "RSA") {
334
+ return typeof key.d === "string";
335
+ }
336
+ return false;
337
+ }
338
+ function isPublicJWK(key) {
339
+ if (!isJWK(key)) return false;
340
+ if (key.kty === "EC") {
341
+ const ec = key;
342
+ return typeof ec.x === "string" && typeof ec.y === "string" && typeof ec.d !== "string";
343
+ }
344
+ if (key.kty === "OKP") {
345
+ const okp = key;
346
+ return typeof okp.x === "string" && typeof okp.d !== "string";
347
+ }
348
+ if (key.kty === "RSA") {
349
+ const rsa = key;
350
+ return typeof rsa.n === "string" && typeof rsa.e === "string" && typeof rsa.d !== "string";
351
+ }
352
+ return false;
353
+ }
319
354
 
320
355
  const index = {
321
356
  __proto__: null,
@@ -331,11 +366,15 @@ const index = {
331
366
  decodePayloadFromB64UrlSegment: decodePayloadFromB64UrlSegment,
332
367
  decodePayloadFromBytes: decodePayloadFromBytes,
333
368
  getPlaintextBytes: getPlaintextBytes,
369
+ isAsymmetricJWK: isAsymmetricJWK,
334
370
  isCryptoKey: isCryptoKey,
335
371
  isCryptoKeyPair: isCryptoKeyPair,
336
372
  isJWK: isJWK,
337
373
  isJWKSet: isJWKSet,
338
374
  isJsonContent: isJsonContent,
375
+ isPrivateJWK: isPrivateJWK,
376
+ isPublicJWK: isPublicJWK,
377
+ isSymmetricJWK: isSymmetricJWK,
339
378
  maybeArray: maybeArray,
340
379
  randomBytes: randomBytes,
341
380
  sanitizeObject: sanitizeObject,
@@ -346,4 +385,4 @@ const index = {
346
385
  validateJwtClaims: validateJwtClaims
347
386
  };
348
387
 
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 };
388
+ export { isPrivateJWK as A, isPublicJWK as B, isJsonContent as C, decodeMaybeJsonString as D, 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, isSymmetricJWK as y, isAsymmetricJWK as z };
@@ -1,4 +1,4 @@
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';
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.BEjwP_9W.mjs';
2
2
 
3
3
  /**
4
4
  * This is a fork of Jose library's utility functions.
@@ -830,7 +830,10 @@ function subtleMapping(jwk) {
830
830
  case "ECDH-ES+A128KW":
831
831
  case "ECDH-ES+A192KW":
832
832
  case "ECDH-ES+A256KW": {
833
- algorithm = { name: "ECDH", namedCurve: jwk.crv };
833
+ algorithm = {
834
+ name: "ECDH",
835
+ namedCurve: jwk.crv
836
+ };
834
837
  keyUsages = jwk.d ? ["deriveBits"] : [];
835
838
  break;
836
839
  }
@@ -1024,7 +1027,7 @@ async function _unwrap(alg, key, encryptedKey) {
1024
1027
  }
1025
1028
 
1026
1029
  async function generateKey(alg, options = {}) {
1027
- const exportToJWK = options.toJWK === true;
1030
+ const exportToJWK = options.toJWK !== void 0 && options.toJWK !== false;
1028
1031
  const defaultExtractable = options.extractable !== false;
1029
1032
  if (alg === "A128CBC-HS256" || alg === "A192CBC-HS384" || alg === "A256CBC-HS512") {
1030
1033
  const keyLength = bitLengthCEK(alg);
@@ -1041,12 +1044,19 @@ async function generateKey(alg, options = {}) {
1041
1044
  keyUsages
1042
1045
  );
1043
1046
  if (exportToJWK) {
1047
+ const {
1048
+ alg: _a,
1049
+ kty: _k,
1050
+ key_ops: _ko,
1051
+ ext: _e,
1052
+ ...additionalKeyParams
1053
+ } = typeof options.toJWK === "object" ? options.toJWK : {};
1044
1054
  if (key instanceof CryptoKey) {
1045
- return exportKey(key, { alg });
1055
+ return exportKey(key, { ...additionalKeyParams, alg });
1046
1056
  } else {
1047
1057
  const [publicKey, privateKey] = await Promise.all([
1048
- exportKey(key.publicKey, { alg }),
1049
- exportKey(key.privateKey, { alg })
1058
+ exportKey(key.publicKey, { ...additionalKeyParams, alg }),
1059
+ exportKey(key.privateKey, { ...additionalKeyParams, alg })
1050
1060
  ]);
1051
1061
  return { privateKey, publicKey };
1052
1062
  }
@@ -1118,7 +1128,7 @@ async function importKey(key, alg) {
1118
1128
  async function exportKey(key, jwk) {
1119
1129
  const exportedJwk = await keyToJWK(key);
1120
1130
  if (jwk) {
1121
- return { ...exportedJwk, ...sanitizeObject(jwk) };
1131
+ return { ...sanitizeObject(jwk), ...exportedJwk };
1122
1132
  }
1123
1133
  return exportedJwk;
1124
1134
  }
@@ -1,4 +1,4 @@
1
- import { I as JWTClaims, M as JWTClaimValidationOptions, m as JWK, n as JWKSet } from './unjwt.CN1C8TlR.mjs';
1
+ import { P as JWTClaims, R as JWTClaimValidationOptions, r as JWK, s as JWKSet, o as JWK_oct, q as JWK_Private, p as JWK_Public } from './unjwt.BsgIQHVD.mjs';
2
2
 
3
3
  /**
4
4
  * Apply default typ/cty semantics shared by JWS & JWE.
@@ -84,6 +84,20 @@ declare function isJWKSet(key: any): key is JWKSet;
84
84
  declare function assertCryptoKey(key: unknown): asserts key is CryptoKey;
85
85
  declare function isCryptoKey(key: unknown): key is CryptoKey;
86
86
  declare const isCryptoKeyPair: (key: any) => key is CryptoKeyPair;
87
+ /** Returns true if the JWK is a symmetric (oct) key. */
88
+ declare function isSymmetricJWK(key: unknown): key is JWK_oct;
89
+ /** Returns true if the JWK is an asymmetric (RSA, EC, OKP) key. */
90
+ declare function isAsymmetricJWK(key: unknown): key is JWK_oct;
91
+ /**
92
+ * Type guard that checks if the provided JWK contains private key material.
93
+ * It relies purely on the presence of private components (e.g. "d"), not on the alg value.
94
+ */
95
+ declare function isPrivateJWK(key: unknown): key is JWK_Private;
96
+ /**
97
+ * Type guard that checks if the provided JWK is a public (asymmetric) key.
98
+ * This checks for the presence of public components and absence of private material.
99
+ */
100
+ declare function isPublicJWK(key: unknown): key is JWK_Public;
87
101
 
88
102
  declare const index_applyTypCtyDefaults: typeof applyTypCtyDefaults;
89
103
  declare const index_assertCryptoKey: typeof assertCryptoKey;
@@ -97,11 +111,15 @@ declare const index_decodeMaybeJsonString: typeof decodeMaybeJsonString;
97
111
  declare const index_decodePayloadFromB64UrlSegment: typeof decodePayloadFromB64UrlSegment;
98
112
  declare const index_decodePayloadFromBytes: typeof decodePayloadFromBytes;
99
113
  declare const index_getPlaintextBytes: typeof getPlaintextBytes;
114
+ declare const index_isAsymmetricJWK: typeof isAsymmetricJWK;
100
115
  declare const index_isCryptoKey: typeof isCryptoKey;
101
116
  declare const index_isCryptoKeyPair: typeof isCryptoKeyPair;
102
117
  declare const index_isJWK: typeof isJWK;
103
118
  declare const index_isJWKSet: typeof isJWKSet;
104
119
  declare const index_isJsonContent: typeof isJsonContent;
120
+ declare const index_isPrivateJWK: typeof isPrivateJWK;
121
+ declare const index_isPublicJWK: typeof isPublicJWK;
122
+ declare const index_isSymmetricJWK: typeof isSymmetricJWK;
105
123
  declare const index_maybeArray: typeof maybeArray;
106
124
  declare const index_randomBytes: typeof randomBytes;
107
125
  declare const index_sanitizeObject: typeof sanitizeObject;
@@ -124,11 +142,15 @@ declare namespace index {
124
142
  index_decodePayloadFromB64UrlSegment as decodePayloadFromB64UrlSegment,
125
143
  index_decodePayloadFromBytes as decodePayloadFromBytes,
126
144
  index_getPlaintextBytes as getPlaintextBytes,
145
+ index_isAsymmetricJWK as isAsymmetricJWK,
127
146
  index_isCryptoKey as isCryptoKey,
128
147
  index_isCryptoKeyPair as isCryptoKeyPair,
129
148
  index_isJWK as isJWK,
130
149
  index_isJWKSet as isJWKSet,
131
150
  index_isJsonContent as isJsonContent,
151
+ index_isPrivateJWK as isPrivateJWK,
152
+ index_isPublicJWK as isPublicJWK,
153
+ index_isSymmetricJWK as isSymmetricJWK,
132
154
  index_maybeArray as maybeArray,
133
155
  index_randomBytes as randomBytes,
134
156
  index_sanitizeObject as sanitizeObject,
@@ -140,4 +162,4 @@ declare namespace index {
140
162
  };
141
163
  }
142
164
 
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 };
165
+ export { validateJwtClaims as A, validateCriticalHeadersJWS as B, validateCriticalHeadersJWE as C, sanitizeObject as D, 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, isSymmetricJWK as n, isAsymmetricJWK as o, isPrivateJWK as p, isPublicJWK as q, randomBytes as r, applyTypCtyDefaults as s, textEncoder as t, isJsonContent as u, decodeMaybeJsonString as v, decodePayloadFromBytes as w, decodePayloadFromB64UrlSegment as x, getPlaintextBytes as y, computeJwtTimeClaims as z };
@@ -1,4 +1,4 @@
1
- import { c as checkSigCryptoKey } from './unjwt.CX8WRx20.mjs';
1
+ import { c as checkSigCryptoKey } from './unjwt.BVlHlXdP.mjs';
2
2
 
3
3
  /**
4
4
  * This is a fork of Jose library's utility functions.
@@ -17,14 +17,14 @@ interface GenerateKeyOptions {
17
17
  /** RSA public exponent. Defaults to 65537 (0x010001). */
18
18
  publicExponent?: Uint8Array<ArrayBuffer>;
19
19
  /** Export the generated key(s) as JWK. If true, the key(s) will be returned in JWK format. */
20
- toJWK?: boolean | undefined;
20
+ toJWK?: undefined | boolean | Omit<JWKParameters, "alg" | "kty" | "key_ops" | "ext">;
21
21
  }
22
22
  type GenerateKeyReturnJWK<TAlg extends GenerateKeyAlgorithm> = TAlg extends JWK_Asymmetric_Algorithm ? {
23
23
  privateKey: JWK;
24
24
  publicKey: JWK;
25
25
  } : JWK;
26
26
  type GenerateKeyReturnCrypto<TAlg extends GenerateKeyAlgorithm> = TAlg extends JWK_AES_CBC_HMAC ? Uint8Array<ArrayBuffer> : TAlg extends JWK_Asymmetric_Algorithm ? CryptoKeyPair : CryptoKey;
27
- type GenerateKeyReturn<TAlg extends GenerateKeyAlgorithm, TOptions extends GenerateKeyOptions> = TOptions["toJWK"] extends true ? GenerateKeyReturnJWK<TAlg> : GenerateKeyReturnCrypto<TAlg>;
27
+ type GenerateKeyReturn<TAlg extends GenerateKeyAlgorithm, TOptions extends GenerateKeyOptions> = TOptions["toJWK"] extends true ? GenerateKeyReturnJWK<TAlg> : TOptions["toJWK"] extends object ? GenerateKeyReturnJWK<TAlg> : GenerateKeyReturnCrypto<TAlg>;
28
28
  /** Options for the deriveKeyFromPassword function. */
29
29
  interface DeriveKeyOptions {
30
30
  /** Salt value (p2s). Must be at least 8 bytes. */
@@ -133,6 +133,8 @@ interface JWKParameters {
133
133
  }
134
134
  /** Public EC JSON Web Keys */
135
135
  interface JWK_EC_Public extends JWKParameters {
136
+ /** EC JWK "kty" (Key Type) Parameter */
137
+ kty: "EC";
136
138
  /** EC JWK "crv" (Curve) Parameter */
137
139
  crv: string;
138
140
  /** EC JWK "x" (X Coordinate) Parameter */
@@ -141,7 +143,7 @@ interface JWK_EC_Public extends JWKParameters {
141
143
  y: string;
142
144
  }
143
145
  /** Private EC JSON Web Keys */
144
- interface JWK_EC_Private extends JWK_EC_Public, JWKParameters {
146
+ interface JWK_EC_Private extends JWK_EC_Public {
145
147
  /** EC JWK "d" (ECC Private Key) Parameter */
146
148
  d: string;
147
149
  }
@@ -149,6 +151,8 @@ interface JWK_EC_Private extends JWK_EC_Public, JWKParameters {
149
151
  type JWK_EC = JWK_EC_Public | JWK_EC_Private;
150
152
  /** Public RSA JSON Web Keys */
151
153
  interface JWK_RSA_Public extends JWKParameters {
154
+ /** RSA JWK "kty" (Key Type) Parameter */
155
+ kty: "RSA";
152
156
  /** RSA JWK "e" (Exponent) Parameter */
153
157
  e: string;
154
158
  /** RSA JWK "n" (Modulus) Parameter */
@@ -156,7 +160,7 @@ interface JWK_RSA_Public extends JWKParameters {
156
160
  oth?: RsaOtherPrimesInfo[];
157
161
  }
158
162
  /** Private RSA JSON Web Keys */
159
- interface JWK_RSA_Private extends JWK_RSA_Public, JWKParameters {
163
+ interface JWK_RSA_Private extends JWK_RSA_Public {
160
164
  /** RSA JWK "d" (Private Exponent) Parameter */
161
165
  d: string;
162
166
  /** RSA JWK "dp" (First Factor CRT Exponent) Parameter */
@@ -172,15 +176,35 @@ interface JWK_RSA_Private extends JWK_RSA_Public, JWKParameters {
172
176
  }
173
177
  /** RSA JSON Web Keys */
174
178
  type JWK_RSA = JWK_RSA_Public | JWK_RSA_Private;
179
+ /** Public ED JSON Web Keys */
180
+ interface JWK_OKP_Public extends JWKParameters {
181
+ /** ED JWK "kty" (Key Type) Parameter */
182
+ kty: "OKP";
183
+ /** ED JWK "crv" (Curve) Parameter */
184
+ crv: string;
185
+ /** ED JWK "x" (X Coordinate) Parameter */
186
+ x: string;
187
+ }
188
+ /** Private ED JSON Web Keys */
189
+ interface JWK_OKP_Private extends JWK_OKP_Public {
190
+ /** ED JWK "d" (Private Key) Parameter */
191
+ d: string;
192
+ }
193
+ /** OKP JSON Web Keys */
194
+ type JWK_OKP = JWK_OKP_Public | JWK_OKP_Private;
175
195
  /** oct JSON Web Keys */
176
196
  interface JWK_oct extends JWKParameters {
177
197
  /** Oct JWK "k" (Key Value) Parameter */
178
198
  k: string;
179
199
  }
200
+ /** Public JSON Web Keys */
201
+ type JWK_Public = JWK_RSA_Public | JWK_EC_Public | JWK_OKP_Public | JWK_oct;
202
+ /** Private JSON Web Keys */
203
+ type JWK_Private = JWK_RSA_Private | JWK_EC_Private | JWK_OKP_Private;
180
204
  /**
181
- * JSON Web Key ({@link https://www.rfc-editor.org/rfc/rfc7517 JWK}). "RSA", "EC" and "oct" key types are supported.
205
+ * JSON Web Key ({@link https://www.rfc-editor.org/rfc/rfc7517 JWK}). "RSA", "EC", "OKP" and "oct" key types are supported.
182
206
  */
183
- type JWK = JWK_oct | JWK_RSA | JWK_EC;
207
+ type JWK = JWK_oct | JWK_RSA | JWK_EC | JWK_OKP;
184
208
  /**
185
209
  * JSON Web Key Set ({@link https://www.rfc-editor.org/rfc/rfc7517 JWK Set}). "RSA", "EC" and "oct" key types are supported.
186
210
  */
@@ -201,11 +225,11 @@ type JWK_AES_CBC_HMAC = "A128CBC-HS256" | "A192CBC-HS384" | "A256CBC-HS512";
201
225
  type JWK_AES_GCM = "A128GCM" | "A192GCM" | "A256GCM";
202
226
  type JWK_PBES2 = "PBES2-HS256+A128KW" | "PBES2-HS384+A192KW" | "PBES2-HS512+A256KW";
203
227
  type JWK_ECDH_ES = "ECDH-ES" | "ECDH-ES+A128KW" | "ECDH-ES+A192KW" | "ECDH-ES+A256KW";
204
- type JWK_ED = "Ed25519" | "EdDSA";
228
+ type JWK_OKP_SIGN = "Ed25519" | "EdDSA";
205
229
  type JWK_Symmetric_Algorithm = JWK_HMAC | JWK_AES_KW | JWK_AES_GCM;
206
- type JWK_Asymmetric_Algorithm = JWK_RSA_SIGN | JWK_RSA_PSS | JWK_ECDSA | JWK_RSA_ENC | JWK_ED;
230
+ type JWK_Asymmetric_Algorithm = JWK_RSA_SIGN | JWK_RSA_PSS | JWK_ECDSA | JWK_RSA_ENC | JWK_OKP_SIGN;
207
231
  type JWKAlgorithm = JWK_Symmetric_Algorithm | JWK_Asymmetric_Algorithm | JWK_AES_CBC_HMAC | JWK_PBES2 | JWK_ECDH_ES | ("none" | "dir");
208
- type JWKPEMAlgorithm = JWK_RSA_PSS | JWK_RSA_SIGN | JWK_RSA_ENC | JWK_ECDSA | JWK_ECDH_ES | JWK_ED;
232
+ type JWKPEMAlgorithm = JWK_RSA_PSS | JWK_RSA_SIGN | JWK_RSA_ENC | JWK_ECDSA | JWK_ECDH_ES | JWK_OKP_SIGN;
209
233
 
210
234
  /** Header Parameters common to JWE and JWS */
211
235
  interface JoseHeaderParameters {
@@ -220,7 +244,7 @@ interface JoseHeaderParameters {
220
244
  /** "jku" (JWK Set URL) Header Parameter */
221
245
  jku?: string;
222
246
  /** "jwk" (JSON Web Key) Header Parameter */
223
- jwk?: JWK_RSA_Public;
247
+ jwk?: JWK_Public;
224
248
  /** "typ" (Type) Header Parameter */
225
249
  typ?: string;
226
250
  /** "cty" (Content Type) Header Parameter */
@@ -282,4 +306,4 @@ interface JWTClaimValidationOptions {
282
306
  critical?: string[];
283
307
  }
284
308
 
285
- export type { JWK_Symmetric_Algorithm as A, JWK_Asymmetric_Algorithm as B, CompositeKey as C, DeriveKeyOptions as D, JWKAlgorithm as E, JWKPEMAlgorithm as F, GenerateKeyAlgorithm as G, JoseHeaderParameters as H, JWTClaims as I, JWKParameters as J, KeyManagementAlgorithm as K, JWT as L, JWTClaimValidationOptions as M, UnwrapKeyOptions as U, WrapKeyOptions as W, GenerateKeyOptions as a, GenerateKeyReturn as b, DeriveKeyReturn as c, ContentEncryptionAlgorithm as d, WrapKeyResult as e, JWK_EC_Public as f, JWK_EC_Private as g, JWK_EC as h, JWK_RSA_Public as i, JWK_RSA_Private as j, JWK_RSA as k, JWK_oct as l, JWK as m, JWKSet as n, JWK_HMAC as o, JWK_RSA_SIGN as p, JWK_RSA_PSS as q, JWK_ECDSA as r, JWK_RSA_ENC as s, JWK_AES_KW as t, JWK_AES_GCM_KW as u, JWK_AES_CBC_HMAC as v, JWK_AES_GCM as w, JWK_PBES2 as x, JWK_ECDH_ES as y, JWK_ED as z };
309
+ export type { JWK_AES_CBC_HMAC as A, JWK_AES_GCM as B, CompositeKey as C, DeriveKeyOptions as D, JWK_PBES2 as E, JWK_ECDH_ES as F, GenerateKeyAlgorithm as G, JWK_OKP_SIGN as H, JWK_Symmetric_Algorithm as I, JWKParameters as J, KeyManagementAlgorithm as K, JWK_Asymmetric_Algorithm as L, JWKAlgorithm as M, JWKPEMAlgorithm as N, JoseHeaderParameters as O, JWTClaims as P, JWT as Q, JWTClaimValidationOptions as R, UnwrapKeyOptions as U, WrapKeyOptions as W, GenerateKeyOptions as a, GenerateKeyReturn as b, DeriveKeyReturn as c, ContentEncryptionAlgorithm as d, WrapKeyResult as e, JWK_EC_Public as f, JWK_EC_Private as g, JWK_EC as h, JWK_RSA_Public as i, JWK_RSA_Private as j, JWK_RSA as k, JWK_OKP_Public as l, JWK_OKP_Private as m, JWK_OKP as n, JWK_oct as o, JWK_Public as p, JWK_Private as q, JWK as r, JWKSet as s, JWK_HMAC as t, JWK_RSA_SIGN as u, JWK_RSA_PSS as v, JWK_ECDSA as w, JWK_RSA_ENC as x, JWK_AES_KW as y, JWK_AES_GCM_KW as z };
@@ -1,4 +1,4 @@
1
- import { G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, x as JWK_PBES2, D as DeriveKeyOptions, c as DeriveKeyReturn, l as JWK_oct, m as JWK, K as KeyManagementAlgorithm, W as WrapKeyOptions, e as WrapKeyResult, U as UnwrapKeyOptions, F as JWKPEMAlgorithm, n as JWKSet, H as JoseHeaderParameters, C as CompositeKey, d as ContentEncryptionAlgorithm, E as JWKAlgorithm, J as JWKParameters, 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, 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 JWT, M as JWTClaimValidationOptions, I as JWTClaims } from './unjwt.CN1C8TlR.mjs';
1
+ import { G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, E as JWK_PBES2, D as DeriveKeyOptions, c as DeriveKeyReturn, o as JWK_oct, r as JWK, K as KeyManagementAlgorithm, W as WrapKeyOptions, e as WrapKeyResult, U as UnwrapKeyOptions, N as JWKPEMAlgorithm, s as JWKSet, O as JoseHeaderParameters, C as CompositeKey, d as ContentEncryptionAlgorithm, M as JWKAlgorithm, J as JWKParameters, A as JWK_AES_CBC_HMAC, B as JWK_AES_GCM, z as JWK_AES_GCM_KW, y as JWK_AES_KW, L as JWK_Asymmetric_Algorithm, h as JWK_EC, F as JWK_ECDH_ES, w as JWK_ECDSA, g as JWK_EC_Private, f as JWK_EC_Public, t as JWK_HMAC, n as JWK_OKP, m as JWK_OKP_Private, l as JWK_OKP_Public, H as JWK_OKP_SIGN, q as JWK_Private, p as JWK_Public, k as JWK_RSA, x as JWK_RSA_ENC, v as JWK_RSA_PSS, j as JWK_RSA_Private, i as JWK_RSA_Public, u as JWK_RSA_SIGN, I as JWK_Symmetric_Algorithm, Q as JWT, R as JWTClaimValidationOptions, P as JWTClaims } from './unjwt.BsgIQHVD.mjs';
2
2
 
3
3
  /**
4
4
  * This is a fork of Jose library's utility functions.
@@ -142,9 +142,14 @@ declare const jwk_JWK_ECDH_ES: typeof JWK_ECDH_ES;
142
142
  declare const jwk_JWK_ECDSA: typeof JWK_ECDSA;
143
143
  declare const jwk_JWK_EC_Private: typeof JWK_EC_Private;
144
144
  declare const jwk_JWK_EC_Public: typeof JWK_EC_Public;
145
- declare const jwk_JWK_ED: typeof JWK_ED;
146
145
  declare const jwk_JWK_HMAC: typeof JWK_HMAC;
146
+ declare const jwk_JWK_OKP: typeof JWK_OKP;
147
+ declare const jwk_JWK_OKP_Private: typeof JWK_OKP_Private;
148
+ declare const jwk_JWK_OKP_Public: typeof JWK_OKP_Public;
149
+ declare const jwk_JWK_OKP_SIGN: typeof JWK_OKP_SIGN;
147
150
  declare const jwk_JWK_PBES2: typeof JWK_PBES2;
151
+ declare const jwk_JWK_Private: typeof JWK_Private;
152
+ declare const jwk_JWK_Public: typeof JWK_Public;
148
153
  declare const jwk_JWK_RSA: typeof JWK_RSA;
149
154
  declare const jwk_JWK_RSA_ENC: typeof JWK_RSA_ENC;
150
155
  declare const jwk_JWK_RSA_PSS: typeof JWK_RSA_PSS;
@@ -194,9 +199,14 @@ declare namespace jwk {
194
199
  jwk_JWK_ECDSA as JWK_ECDSA,
195
200
  jwk_JWK_EC_Private as JWK_EC_Private,
196
201
  jwk_JWK_EC_Public as JWK_EC_Public,
197
- jwk_JWK_ED as JWK_ED,
198
202
  jwk_JWK_HMAC as JWK_HMAC,
203
+ jwk_JWK_OKP as JWK_OKP,
204
+ jwk_JWK_OKP_Private as JWK_OKP_Private,
205
+ jwk_JWK_OKP_Public as JWK_OKP_Public,
206
+ jwk_JWK_OKP_SIGN as JWK_OKP_SIGN,
199
207
  jwk_JWK_PBES2 as JWK_PBES2,
208
+ jwk_JWK_Private as JWK_Private,
209
+ jwk_JWK_Public as JWK_Public,
200
210
  jwk_JWK_RSA as JWK_RSA,
201
211
  jwk_JWK_RSA_ENC as JWK_RSA_ENC,
202
212
  jwk_JWK_RSA_PSS as JWK_RSA_PSS,
@@ -1,4 +1,4 @@
1
- import { K as KeyManagementAlgorithm, d as ContentEncryptionAlgorithm, H as JoseHeaderParameters, f as JWK_EC_Public, m as JWK, M as JWTClaimValidationOptions, I as JWTClaims, L as JWT } from './unjwt.CN1C8TlR.mjs';
1
+ import { K as KeyManagementAlgorithm, d as ContentEncryptionAlgorithm, O as JoseHeaderParameters, f as JWK_EC_Public, r as JWK, R as JWTClaimValidationOptions, P as JWTClaims, Q as JWT } from './unjwt.BsgIQHVD.mjs';
2
2
 
3
3
  /** Recognized JWE Header Parameters, any other Header Members may also be present. */
4
4
  interface JWEHeaderParameters extends JoseHeaderParameters {
@@ -1,4 +1,4 @@
1
- import { o as JWK_HMAC, p as JWK_RSA_SIGN, q as JWK_RSA_PSS, r as JWK_ECDSA, H as JoseHeaderParameters, m as JWK, n as JWKSet, M as JWTClaimValidationOptions, I as JWTClaims, L as JWT } from './unjwt.CN1C8TlR.mjs';
1
+ import { t as JWK_HMAC, u as JWK_RSA_SIGN, v as JWK_RSA_PSS, w as JWK_ECDSA, O as JoseHeaderParameters, r as JWK, s as JWKSet, R as JWTClaimValidationOptions, P as JWTClaims, Q as JWT } from './unjwt.BsgIQHVD.mjs';
2
2
 
3
3
  type JWS_SIGN_EXTRA = "Ed25519" | "EdDSA";
4
4
  /** JWS Signing Algorithm Identifier. */
@@ -1,6 +1,6 @@
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';
1
+ import { i as importKey, g as getJWKFromSet } from './unjwt.BVlHlXdP.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.BEjwP_9W.mjs';
3
+ import { s as sign$1, v as verify$1 } from './unjwt.BaB7HUR1.mjs';
4
4
 
5
5
  async function sign(payload, key, options = {}) {
6
6
  const { protectedHeader: additionalProtectedHeader } = options;
package/dist/utils.d.mts CHANGED
@@ -1,2 +1,2 @@
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, z as sanitizeObject, a as textDecoder, t as textEncoder, y as validateCriticalHeadersJWE, x as validateCriticalHeadersJWS, w as validateJwtClaims } from './shared/unjwt.Cay_cOOI.mjs';
1
+ import './shared/unjwt.BsgIQHVD.mjs';
2
+ export { s as applyTypCtyDefaults, j as assertCryptoKey, d as base64Decode, b as base64Encode, e as base64UrlDecode, c as base64UrlEncode, z as computeJwtTimeClaims, f as concatUint8Arrays, v as decodeMaybeJsonString, x as decodePayloadFromB64UrlSegment, w as decodePayloadFromBytes, y as getPlaintextBytes, o as isAsymmetricJWK, k as isCryptoKey, l as isCryptoKeyPair, g as isJWK, h as isJWKSet, u as isJsonContent, p as isPrivateJWK, q as isPublicJWK, n as isSymmetricJWK, m as maybeArray, r as randomBytes, D as sanitizeObject, a as textDecoder, t as textEncoder, C as validateCriticalHeadersJWE, B as validateCriticalHeadersJWS, A as validateJwtClaims } from './shared/unjwt.BYaxDvLV.mjs';
package/dist/utils.mjs CHANGED
@@ -1 +1 @@
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';
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, D as decodeMaybeJsonString, h as decodePayloadFromB64UrlSegment, o as decodePayloadFromBytes, n as getPlaintextBytes, z as isAsymmetricJWK, m as isCryptoKey, x as isCryptoKeyPair, a as isJWK, g as isJWKSet, C as isJsonContent, A as isPrivateJWK, B as isPublicJWK, y as isSymmetricJWK, 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.BEjwP_9W.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unjwt",
3
- "version": "0.5.13",
3
+ "version": "0.5.14",
4
4
  "description": "Low-level JWT utilities",
5
5
  "repository": "sandros94/unjwt",
6
6
  "license": "MIT",