unjwt 0.7.0 → 0.7.2
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/README.md +26 -361
- package/dist/_chunks/_internal.mjs +5 -5
- package/dist/_chunks/index.d.mts +175 -55
- package/dist/_chunks/jwe.d.mts +10 -8
- package/dist/_chunks/jwe.mjs +5 -5
- package/dist/_chunks/jwk.mjs +24 -9
- package/dist/_chunks/jws.d.mts +6 -6
- package/dist/_chunks/jws.mjs +5 -5
- package/dist/_chunks/libs/unsecure.d.mts +7 -7
- package/dist/_chunks/libs/unsecure.mjs +10 -5
- package/dist/_chunks/utils.mjs +2 -2
- package/dist/adapters/elysia/index.d.mts +244 -0
- package/dist/adapters/elysia/index.mjs +608 -0
- package/dist/adapters/h3v1/index.d.mts +128 -50
- package/dist/adapters/h3v1/index.mjs +18 -15
- package/dist/adapters/h3v2/index.d.mts +148 -28
- package/dist/adapters/h3v2/index.mjs +19 -16
- package/dist/core/jwe.d.mts +3 -3
- package/dist/core/jwe.mjs +2 -2
- package/dist/core/jwk.d.mts +14 -14
- package/dist/core/jwk.mjs +2 -2
- package/dist/core/jws.d.mts +3 -3
- package/dist/core/jws.mjs +2 -2
- package/dist/core/utils/index.d.mts +42 -10
- package/dist/core/utils/index.mjs +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +26 -14
- package/dist/THIRD-PARTY-LICENSES.md +0 -63
- package/dist/_chunks/libs/rou3.mjs +0 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Duration, ExpiresIn, JWK, JWKSet, JWK_EC_Private, JWK_EC_Public, JWK_OKP_Private, JWK_OKP_Public, JWK_Private, JWK_Public, JWK_RSA_Private, JWK_RSA_Public, JWK_oct, JWSAlgorithm, JWTClaimValidationOptions, JWTClaims, KeyManagementAlgorithm, StrictOmit } from "../../_chunks/index.mjs";
|
|
2
|
+
import { base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder } from "../../_chunks/libs/unsecure.mjs";
|
|
3
3
|
/**
|
|
4
4
|
* Infer the set of JWS signing algorithms a key unambiguously supports.
|
|
5
5
|
* Returns `undefined` when inference is not possible — callers must pass
|
|
@@ -106,18 +106,50 @@ declare function assertCryptoKey(key: unknown): asserts key is CryptoKey;
|
|
|
106
106
|
declare function isCryptoKey(key: unknown): key is CryptoKey;
|
|
107
107
|
/** Type guard for `CryptoKeyPair` — both `publicKey` and `privateKey` must be CryptoKeys. */
|
|
108
108
|
declare const isCryptoKeyPair: (key: any) => key is CryptoKeyPair;
|
|
109
|
-
/**
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Returns true if the JWK is a symmetric (oct) key.
|
|
111
|
+
*
|
|
112
|
+
* NOTE: a symmetric JWK's `k` is always secret key material. {@link isPrivateJWK}
|
|
113
|
+
* returns `false` for `oct` keys (it only detects asymmetric `d`), so use this
|
|
114
|
+
* guard — not `!isPrivateJWK(key)` — when deciding whether a JWK is safe to
|
|
115
|
+
* publish.
|
|
116
|
+
*
|
|
117
|
+
* The `T` inference preserves the caller's narrowed alg type — passing a
|
|
118
|
+
* `JWK_oct<"HS256">` refines to `JWK_oct<"HS256">`, not `JWK_oct<string>`.
|
|
119
|
+
*/
|
|
120
|
+
declare function isSymmetricJWK<T>(key: T): key is Extract<T, JWK_oct>;
|
|
121
|
+
declare function isSymmetricJWK(key: unknown): key is JWK_oct;
|
|
122
|
+
/**
|
|
123
|
+
* Returns true if the JWK is an asymmetric (RSA, EC, OKP) key.
|
|
124
|
+
*
|
|
125
|
+
* The `T` inference preserves the caller's narrowed alg type — passing a
|
|
126
|
+
* `JWK_EC<"ES256">` refines to `JWK_EC<"ES256">`, not `JWK_EC<string>`,
|
|
127
|
+
* and so on for RSA and OKP.
|
|
128
|
+
*/
|
|
129
|
+
declare function isAsymmetricJWK<T>(key: T): key is Exclude<T, JWK_oct>;
|
|
112
130
|
declare function isAsymmetricJWK(key: unknown): key is Exclude<JWK, JWK_oct>;
|
|
113
131
|
/**
|
|
114
|
-
* Type guard that checks if the provided JWK contains private key
|
|
115
|
-
* It relies purely on the presence of private components (e.g. "d"),
|
|
132
|
+
* Type guard that checks if the provided JWK contains *asymmetric* private key
|
|
133
|
+
* material. It relies purely on the presence of private components (e.g. "d"),
|
|
134
|
+
* not on the alg value.
|
|
135
|
+
*
|
|
136
|
+
* WARNING: this returns `false` for symmetric (`oct`) keys — their `k` is secret
|
|
137
|
+
* material too, but it is not a `d` component. `!isPrivateJWK(key)` is therefore
|
|
138
|
+
* NOT a "safe to share" check: it passes every `oct` key. To filter keys that
|
|
139
|
+
* are safe to publish, use {@link isPublicJWK} (true only for asymmetric public
|
|
140
|
+
* keys); to detect any secret material, combine with {@link isSymmetricJWK}.
|
|
141
|
+
*
|
|
142
|
+
* Preserves narrow alg types from the caller.
|
|
116
143
|
*/
|
|
144
|
+
declare function isPrivateJWK<T>(key: T): key is Extract<T, JWK_EC_Private | JWK_OKP_Private | JWK_RSA_Private>;
|
|
117
145
|
declare function isPrivateJWK(key: unknown): key is JWK_Private;
|
|
118
146
|
/**
|
|
119
|
-
* Type guard that checks if the provided JWK is a public (asymmetric) key
|
|
120
|
-
*
|
|
147
|
+
* Type guard that checks if the provided JWK is a public (asymmetric) key:
|
|
148
|
+
* public components present, no private `d`. Returns `false` for `oct` keys
|
|
149
|
+
* (which are always secret), making it the correct "safe to publish" predicate.
|
|
150
|
+
*
|
|
151
|
+
* Preserves narrow alg types from the caller.
|
|
121
152
|
*/
|
|
153
|
+
declare function isPublicJWK<T>(key: T): key is Exclude<Extract<T, JWK_EC_Public | JWK_OKP_Public | JWK_RSA_Public>, JWK_Private>;
|
|
122
154
|
declare function isPublicJWK(key: unknown): key is JWK_Public;
|
|
123
|
-
export { ComputeJwtTimeClaimsOptions, StrictOmit, applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
|
155
|
+
export { ComputeJwtTimeClaimsOptions, type StrictOmit, applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { applyTypCtyDefaults, assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims } from "../../_chunks/utils.mjs";
|
|
2
|
+
import { base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder } from "../../_chunks/libs/unsecure.mjs";
|
|
3
3
|
export { applyTypCtyDefaults, assertCryptoKey, base64Decode, base64Encode, base64UrlDecode, base64UrlEncode, computeDurationInSeconds, computeExpiresInSeconds, computeJwtTimeClaims, computeMaxTokenAgeSeconds, concatUint8Arrays, decodeMaybeJWTString, decodePayloadFromB64UrlSegment, decodePayloadFromBytes, getPlaintextBytes, inferJWEAllowedAlgorithms, inferJWSAllowedAlgorithms, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTContent, isPrivateJWK, isPublicJWK, isSymmetricJWK, maybeArray, safeJsonParse, sanitizeObject, sanitizeObjectCopy, secureRandomBytes, textDecoder, textEncoder, validateCriticalHeadersJWE, validateCriticalHeadersJWS, validateJwtClaims };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, JOSEPayload, JWEAsymmetricPrivateJWK, JWEAsymmetricPublicJWK, JWEDecryptJWK, JWEDecryptOptions, JWEDecryptResult, JWEEncryptJWK, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSAsymmetricPrivateJWK, JWSAsymmetricPublicJWK, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignJWK, JWSSignOptions, JWSVerifyJWK, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JWTError, JWTErrorCauseMap, JWTErrorCode, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, UnwrapKeyOptions, UnwrappingKeyFor, WrapKeyOptions, WrapKeyResult, WrappingKeyFor, isJWTError } from "./_chunks/index.mjs";
|
|
2
2
|
import { WeakMapJWKCache, clearJWKCache, configureJWKCache, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, exportKey, exportPEM, exportToPEM, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, unwrapKey, wrapKey } from "./core/jwk.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { decrypt, decryptMulti, encrypt, encryptMulti, generalToFlattened } from "./_chunks/jwe.mjs";
|
|
4
|
+
import { generalToFlattenedJWS, sign, signMulti, verify, verifyMulti, verifyMultiAll } from "./_chunks/jws.mjs";
|
|
5
5
|
import { assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isPrivateJWK, isPublicJWK, isSymmetricJWK, validateJwtClaims } from "./core/utils/index.mjs";
|
|
6
|
-
export { CompositeKey, ContentEncryptionAlgorithm, DeriveKeyOptions, DeriveKeyReturn, Duration, ExpiresIn, GenerateJWKOptions, GenerateJWKReturn, GenerateKeyAlgorithm, GenerateKeyOptions, GenerateKeyReturn, JOSEPayload, JWEDecryptOptions, JWEDecryptResult, JWEEncryptOptions, JWEFlattenedSerialization, JWEGeneralRecipient, JWEGeneralSerialization, JWEHeaderParameters, JWEKeyManagementHeaderParameters, JWEMultiDecryptOptions, JWEMultiDecryptResult, JWEMultiEncryptOptions, JWEMultiRecipient, JWEProtectedHeader, JWK, JWKAlgorithm, JWKCacheAdapter, JWKLookupFunction, JWKLookupFunctionHeader, JWKPEMAlgorithm, JWKParameters, JWKSet, JWK_AES_CBC_HMAC, JWK_AES_GCM, JWK_AES_GCM_KW, JWK_AES_KW, JWK_Asymmetric, JWK_Asymmetric_Algorithm, JWK_EC, JWK_ECDH_ES, JWK_ECDSA, JWK_EC_Private, JWK_EC_Public, JWK_HMAC, JWK_OKP, JWK_OKP_Private, JWK_OKP_Public, JWK_OKP_SIGN, JWK_PBES2, JWK_Pair, JWK_Private, JWK_Public, JWK_RSA, JWK_RSA_ENC, JWK_RSA_PSS, JWK_RSA_Private, JWK_RSA_Public, JWK_RSA_SIGN, JWK_Symmetric, JWK_Symmetric_Algorithm, JWK_oct, JWSAlgorithm, JWSFlattenedSerialization, JWSGeneralSerialization, JWSGeneralSignature, JWSHeaderParameters, JWSMultiSignOptions, JWSMultiSigner, JWSMultiVerifyAllOptions, JWSMultiVerifyOptions, JWSMultiVerifyOutcome, JWSMultiVerifyResult, JWSProtectedHeader, JWSSignOptions, JWSVerifyOptions, JWSVerifyResult, JWT, JWTClaimValidationOptions, JWTClaims, JWTError, type JWTErrorCauseMap, type JWTErrorCode, JoseHeaderParameters, KeyManagementAlgorithm, MaxTokenAge, NotBeforeIn, UnwrapKeyOptions, WeakMapJWKCache, WrapKeyOptions, WrapKeyResult, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
|
6
|
+
export { type CompositeKey, type ContentEncryptionAlgorithm, type DeriveKeyOptions, type DeriveKeyReturn, type Duration, type ExpiresIn, type GenerateJWKOptions, type GenerateJWKReturn, type GenerateKeyAlgorithm, type GenerateKeyOptions, type GenerateKeyReturn, type JOSEPayload, type JWEAsymmetricPrivateJWK, type JWEAsymmetricPublicJWK, type JWEDecryptJWK, type JWEDecryptOptions, type JWEDecryptResult, type JWEEncryptJWK, type JWEEncryptOptions, type JWEFlattenedSerialization, type JWEGeneralRecipient, type JWEGeneralSerialization, type JWEHeaderParameters, type JWEKeyManagementHeaderParameters, type JWEMultiDecryptOptions, type JWEMultiDecryptResult, type JWEMultiEncryptOptions, type JWEMultiRecipient, type JWEProtectedHeader, type JWK, type JWKAlgorithm, type JWKCacheAdapter, type JWKLookupFunction, type JWKLookupFunctionHeader, type JWKPEMAlgorithm, type JWKParameters, type JWKSet, type JWK_AES_CBC_HMAC, type JWK_AES_GCM, type JWK_AES_GCM_KW, type JWK_AES_KW, type JWK_Asymmetric, type JWK_Asymmetric_Algorithm, type JWK_EC, type JWK_ECDH_ES, type JWK_ECDSA, type JWK_EC_Private, type JWK_EC_Public, type JWK_HMAC, type JWK_OKP, type JWK_OKP_Private, type JWK_OKP_Public, type JWK_OKP_SIGN, type JWK_PBES2, type JWK_Pair, type JWK_Private, type JWK_Public, type JWK_RSA, type JWK_RSA_ENC, type JWK_RSA_PSS, type JWK_RSA_Private, type JWK_RSA_Public, type JWK_RSA_SIGN, type JWK_Symmetric, type JWK_Symmetric_Algorithm, type JWK_oct, type JWSAlgorithm, type JWSAsymmetricPrivateJWK, type JWSAsymmetricPublicJWK, type JWSFlattenedSerialization, type JWSGeneralSerialization, type JWSGeneralSignature, type JWSHeaderParameters, type JWSMultiSignOptions, type JWSMultiSigner, type JWSMultiVerifyAllOptions, type JWSMultiVerifyOptions, type JWSMultiVerifyOutcome, type JWSMultiVerifyResult, type JWSProtectedHeader, type JWSSignJWK, type JWSSignOptions, type JWSVerifyJWK, type JWSVerifyOptions, type JWSVerifyResult, type JWT, type JWTClaimValidationOptions, type JWTClaims, JWTError, type JWTErrorCauseMap, type JWTErrorCode, type JoseHeaderParameters, type KeyManagementAlgorithm, type MaxTokenAge, type NotBeforeIn, type UnwrapKeyOptions, type UnwrappingKeyFor, WeakMapJWKCache, type WrapKeyOptions, type WrapKeyResult, type WrappingKeyFor, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { JWTError, assertCryptoKey, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, validateJwtClaims } from "./_chunks/utils.mjs";
|
|
2
|
+
import { WeakMapJWKCache, clearJWKCache, configureJWKCache, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, exportKey, exportPEM, exportToPEM, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, unwrapKey, wrapKey } from "./_chunks/jwk.mjs";
|
|
3
|
+
import { generalToFlattenedJWS, sign, signMulti, verify, verifyMulti, verifyMultiAll } from "./_chunks/jws.mjs";
|
|
4
|
+
import { decrypt, decryptMulti, encrypt, encryptMulti, generalToFlattened } from "./_chunks/jwe.mjs";
|
|
5
5
|
export { JWTError, WeakMapJWKCache, assertCryptoKey, clearJWKCache, computeDurationInSeconds, computeExpiresInSeconds, computeMaxTokenAgeSeconds, configureJWKCache, decrypt, decryptMulti, deriveJWKFromPassword, deriveKeyFromPassword, deriveSharedSecret, encrypt, encryptMulti, exportKey, exportPEM, exportToPEM, generalToFlattened, generalToFlattenedJWS, generateJWK, generateKey, getJWKFromSet, getJWKsFromSet, importFromPEM, importKey, importPEM, isAsymmetricJWK, isCryptoKey, isCryptoKeyPair, isJWK, isJWKSet, isJWTError, isPrivateJWK, isPublicJWK, isSymmetricJWK, sign, signMulti, unwrapKey, validateJwtClaims, verify, verifyMulti, verifyMultiAll, wrapKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unjwt",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Low-level JWT utilities",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -51,42 +51,54 @@
|
|
|
51
51
|
"./adapters/h3v2": {
|
|
52
52
|
"types": "./dist/adapters/h3v2/index.d.mts",
|
|
53
53
|
"default": "./dist/adapters/h3v2/index.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./adapters/elysia": {
|
|
56
|
+
"types": "./dist/adapters/elysia/index.d.mts",
|
|
57
|
+
"default": "./dist/adapters/elysia/index.mjs"
|
|
54
58
|
}
|
|
55
59
|
},
|
|
56
60
|
"devDependencies": {
|
|
57
|
-
"@types/node": "^
|
|
61
|
+
"@types/node": "^25",
|
|
58
62
|
"@types/supertest": "^7.2.0",
|
|
59
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
60
|
-
"@vitest/coverage-v8": "^4.1.
|
|
63
|
+
"@typescript/native-preview": "7.0.0-dev.20260611.2",
|
|
64
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
61
65
|
"automd": "^0.4.3",
|
|
62
66
|
"changelogen": "^0.6.2",
|
|
63
67
|
"cookie-esv1": "npm:cookie-es@^1.2.3",
|
|
64
68
|
"cookie-esv3": "npm:cookie-es@^3.1.1",
|
|
69
|
+
"elysia": "^1.4.9",
|
|
65
70
|
"h3v1": "npm:h3@^1.15.11",
|
|
66
|
-
"h3v2": "npm:h3@^2.0.1-rc.
|
|
67
|
-
"jose": "^6.2.
|
|
71
|
+
"h3v2": "npm:h3@^2.0.1-rc.22",
|
|
72
|
+
"jose": "^6.2.3",
|
|
68
73
|
"nano-staged": "^1.0.2",
|
|
69
|
-
"obuild": "^0.4.
|
|
70
|
-
"oxfmt": "^0.
|
|
71
|
-
"oxlint": "^1.
|
|
72
|
-
"rolldown": "1.
|
|
73
|
-
"rou3": "^0.8.1",
|
|
74
|
+
"obuild": "^0.4.36",
|
|
75
|
+
"oxfmt": "^0.54.0",
|
|
76
|
+
"oxlint": "^1.69.0",
|
|
77
|
+
"rolldown": "1.1.1",
|
|
74
78
|
"simple-git-hooks": "^2.13.1",
|
|
75
79
|
"supertest": "^7.2.2",
|
|
76
80
|
"typescript": "^6.0.3",
|
|
77
|
-
"unsecure": "^0.2.
|
|
78
|
-
"vitest": "^4.1.
|
|
81
|
+
"unsecure": "^0.2.2",
|
|
82
|
+
"vitest": "^4.1.8"
|
|
79
83
|
},
|
|
80
84
|
"peerDependencies": {
|
|
81
85
|
"cookie-es": "^1.2.3 || ^3.1.1",
|
|
82
|
-
"
|
|
86
|
+
"elysia": "^1.4.0",
|
|
87
|
+
"h3": "^1.15.4 || >=2.0.1-rc.22 || ^2.0.1",
|
|
88
|
+
"rou3": "^0.8.1"
|
|
83
89
|
},
|
|
84
90
|
"peerDependenciesMeta": {
|
|
85
91
|
"cookie-es": {
|
|
86
92
|
"optional": true
|
|
87
93
|
},
|
|
94
|
+
"elysia": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
88
97
|
"h3": {
|
|
89
98
|
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"rou3": {
|
|
101
|
+
"optional": true
|
|
90
102
|
}
|
|
91
103
|
},
|
|
92
104
|
"resolutions": {
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Licenses of Bundled Dependencies
|
|
2
|
-
|
|
3
|
-
The published artifact additionally contains code with the following licenses:
|
|
4
|
-
MIT
|
|
5
|
-
|
|
6
|
-
# Bundled Dependencies
|
|
7
|
-
|
|
8
|
-
## rou3
|
|
9
|
-
|
|
10
|
-
License: MIT
|
|
11
|
-
Repository: https://github.com/h3js/rou3
|
|
12
|
-
|
|
13
|
-
> MIT License
|
|
14
|
-
>
|
|
15
|
-
> Copyright (c) Pooya Parsa <pooya@pi0.io>
|
|
16
|
-
>
|
|
17
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
19
|
-
> in the Software without restriction, including without limitation the rights
|
|
20
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
22
|
-
> furnished to do so, subject to the following conditions:
|
|
23
|
-
>
|
|
24
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
25
|
-
> copies or substantial portions of the Software.
|
|
26
|
-
>
|
|
27
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
-
> SOFTWARE.
|
|
34
|
-
|
|
35
|
-
---------------------------------------
|
|
36
|
-
|
|
37
|
-
## unsecure
|
|
38
|
-
|
|
39
|
-
License: MIT
|
|
40
|
-
By: Sandro Circi
|
|
41
|
-
Repository: https://github.com/sandros94/unsecure
|
|
42
|
-
|
|
43
|
-
> MIT License
|
|
44
|
-
>
|
|
45
|
-
> Copyright (c) 2025 Sandro Circi
|
|
46
|
-
>
|
|
47
|
-
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
48
|
-
> of this software and associated documentation files (the "Software"), to deal
|
|
49
|
-
> in the Software without restriction, including without limitation the rights
|
|
50
|
-
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
51
|
-
> copies of the Software, and to permit persons to whom the Software is
|
|
52
|
-
> furnished to do so, subject to the following conditions:
|
|
53
|
-
>
|
|
54
|
-
> The above copyright notice and this permission notice shall be included in all
|
|
55
|
-
> copies or substantial portions of the Software.
|
|
56
|
-
>
|
|
57
|
-
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
58
|
-
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
59
|
-
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
60
|
-
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
61
|
-
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
62
|
-
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
63
|
-
> SOFTWARE.
|