unjwt 0.5.16 → 0.5.17
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 +0 -8
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +4 -5
- package/dist/jwe.d.mts +2 -2
- package/dist/jwe.mjs +3 -4
- package/dist/jwk.d.mts +2 -2
- package/dist/jwk.mjs +2 -2
- package/dist/jws.d.mts +2 -2
- package/dist/jws.mjs +3 -4
- package/dist/shared/{unjwt.D1MC63Yb.mjs → unjwt.A5jxFsjh.mjs} +578 -44
- package/dist/shared/{unjwt.BkUfaQRR.d.mts → unjwt.BQUETRUD.d.mts} +25 -8
- package/dist/shared/{unjwt.u3h40Nr-.mjs → unjwt.Bui8we0H.mjs} +2 -3
- package/dist/shared/{unjwt.OzI0aGB_.d.mts → unjwt.ClaeEBcy.d.mts} +20 -8
- package/dist/shared/unjwt.D5J5ziZr.mjs +247 -0
- package/dist/shared/{unjwt.CbxAdgsb.d.mts → unjwt.Djt8pPsc.d.mts} +17 -2
- package/dist/shared/{unjwt.DUVOOOvO.d.mts → unjwt.DuLUtSpD.d.mts} +1 -1
- package/dist/shared/{unjwt.r8lbwWSJ.d.mts → unjwt.fumhLslo.d.mts} +4 -2
- package/dist/shared/{unjwt.CRHfsi7v.mjs → unjwt.tM5bsBSH.mjs} +1 -1
- package/dist/utils.d.mts +2 -2
- package/dist/utils.mjs +1 -1
- package/package.json +3 -3
- package/dist/shared/unjwt.BZ3B0Ak8.mjs +0 -395
- package/dist/shared/unjwt.BpusjhPR.mjs +0 -101
package/README.md
CHANGED
|
@@ -14,14 +14,6 @@ A collection of low-level JWT ([RFC 7519](https://datatracker.ietf.org/doc/html/
|
|
|
14
14
|
- **JWE (JSON Web Encryption, [RFC 7516](https://datatracker.ietf.org/doc/html/rfc7516))**: encrypt and decrypt data using various key management algorithms (AES Key Wrap, AES-GCM Key Wrap, RSA-OAEP, PBES2, ECDH-ES) and content encryption algorithms (AES-GCM, AES-CBC HMAC-SHA2).
|
|
15
15
|
- **JWK (JSON Web Key, [RFC 7517](https://datatracker.ietf.org/doc/html/rfc7517))**: generate, import, export, wrap, and unwrap keys in JWK format or as `CryptoKey` objects.
|
|
16
16
|
|
|
17
|
-
> [!WARNING]
|
|
18
|
-
> Please do note that some algorithms are not fully working out-of-the-box yet, such as:
|
|
19
|
-
>
|
|
20
|
-
> - ECDH-ES algorithms with AES Key Wrap (e.g., ECDH-ES+A128KW)
|
|
21
|
-
> - RSA algorithms in combination with some bigger CBC encodings (for example RSA-OAEP-256 with A256CBC-HS512)
|
|
22
|
-
>
|
|
23
|
-
> For these algorithms, you should be able to provide your own keys. Although I do plan to study and simplify this.
|
|
24
|
-
|
|
25
17
|
## Usage
|
|
26
18
|
|
|
27
19
|
Install the package:
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as CompositeKey,
|
|
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.
|
|
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.
|
|
4
|
-
export { i as utils } from './shared/unjwt.
|
|
5
|
-
export { j as jwk } from './shared/unjwt.
|
|
1
|
+
export { C as CompositeKey, f as ContentEncryptionAlgorithm, D as DeriveKeyOptions, e as DeriveKeyReturn, c as GenerateJWKOptions, d as GenerateJWKReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, t as JWK, O as JWKAlgorithm, P as JWKPEMAlgorithm, J as JWKParameters, u as JWKSet, E as JWK_AES_CBC_HMAC, F as JWK_AES_GCM, B as JWK_AES_GCM_KW, A as JWK_AES_KW, N as JWK_Asymmetric_Algorithm, j as JWK_EC, I as JWK_ECDH_ES, y as JWK_ECDSA, i as JWK_EC_Private, h as JWK_EC_Public, v as JWK_HMAC, p as JWK_OKP, o as JWK_OKP_Private, n as JWK_OKP_Public, L as JWK_OKP_SIGN, H as JWK_PBES2, s as JWK_Private, r as JWK_Public, m as JWK_RSA, z as JWK_RSA_ENC, x as JWK_RSA_PSS, l as JWK_RSA_Private, k as JWK_RSA_Public, w as JWK_RSA_SIGN, M as JWK_Symmetric_Algorithm, q as JWK_oct, S as JWT, T as JWTClaimValidationOptions, R as JWTClaims, Q as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, g as WrapKeyResult } from './shared/unjwt.ClaeEBcy.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.fumhLslo.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.BQUETRUD.mjs';
|
|
4
|
+
export { i as utils } from './shared/unjwt.DuLUtSpD.mjs';
|
|
5
|
+
export { j as jwk } from './shared/unjwt.Djt8pPsc.mjs';
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { i as utils } from './shared/unjwt.
|
|
2
|
-
export { j as jwe } from './shared/unjwt.
|
|
3
|
-
export { j as jwk } from './shared/unjwt.
|
|
4
|
-
export { j as jws } from './shared/unjwt.
|
|
5
|
-
import './shared/unjwt.BpusjhPR.mjs';
|
|
1
|
+
export { i as utils } from './shared/unjwt.tM5bsBSH.mjs';
|
|
2
|
+
export { j as jwe } from './shared/unjwt.D5J5ziZr.mjs';
|
|
3
|
+
export { j as jwk } from './shared/unjwt.A5jxFsjh.mjs';
|
|
4
|
+
export { j as jws } from './shared/unjwt.Bui8we0H.mjs';
|
package/dist/jwe.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CompositeKey,
|
|
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.
|
|
1
|
+
export { C as CompositeKey, f as ContentEncryptionAlgorithm, D as DeriveKeyOptions, e as DeriveKeyReturn, c as GenerateJWKOptions, d as GenerateJWKReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, t as JWK, O as JWKAlgorithm, P as JWKPEMAlgorithm, J as JWKParameters, u as JWKSet, E as JWK_AES_CBC_HMAC, F as JWK_AES_GCM, B as JWK_AES_GCM_KW, A as JWK_AES_KW, N as JWK_Asymmetric_Algorithm, j as JWK_EC, I as JWK_ECDH_ES, y as JWK_ECDSA, i as JWK_EC_Private, h as JWK_EC_Public, v as JWK_HMAC, p as JWK_OKP, o as JWK_OKP_Private, n as JWK_OKP_Public, L as JWK_OKP_SIGN, H as JWK_PBES2, s as JWK_Private, r as JWK_Public, m as JWK_RSA, z as JWK_RSA_ENC, x as JWK_RSA_PSS, l as JWK_RSA_Private, k as JWK_RSA_Public, w as JWK_RSA_SIGN, M as JWK_Symmetric_Algorithm, q as JWK_oct, S as JWT, T as JWTClaimValidationOptions, R as JWTClaims, Q as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, g as WrapKeyResult } from './shared/unjwt.ClaeEBcy.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.BQUETRUD.mjs';
|
package/dist/jwe.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './shared/unjwt.
|
|
2
|
-
import './shared/unjwt.
|
|
3
|
-
export { d as decrypt, e as encrypt } from './shared/unjwt.
|
|
4
|
-
import './shared/unjwt.BpusjhPR.mjs';
|
|
1
|
+
import './shared/unjwt.A5jxFsjh.mjs';
|
|
2
|
+
import './shared/unjwt.tM5bsBSH.mjs';
|
|
3
|
+
export { d as decrypt, e as encrypt } from './shared/unjwt.D5J5ziZr.mjs';
|
package/dist/jwk.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CompositeKey,
|
|
2
|
-
export { d as deriveKeyFromPassword,
|
|
1
|
+
export { C as CompositeKey, f as ContentEncryptionAlgorithm, D as DeriveKeyOptions, e as DeriveKeyReturn, c as GenerateJWKOptions, d as GenerateJWKReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, t as JWK, O as JWKAlgorithm, P as JWKPEMAlgorithm, J as JWKParameters, u as JWKSet, E as JWK_AES_CBC_HMAC, F as JWK_AES_GCM, B as JWK_AES_GCM_KW, A as JWK_AES_KW, N as JWK_Asymmetric_Algorithm, j as JWK_EC, I as JWK_ECDH_ES, y as JWK_ECDSA, i as JWK_EC_Private, h as JWK_EC_Public, v as JWK_HMAC, p as JWK_OKP, o as JWK_OKP_Private, n as JWK_OKP_Public, L as JWK_OKP_SIGN, H as JWK_PBES2, s as JWK_Private, r as JWK_Public, m as JWK_RSA, z as JWK_RSA_ENC, x as JWK_RSA_PSS, l as JWK_RSA_Private, k as JWK_RSA_Public, w as JWK_RSA_SIGN, M as JWK_Symmetric_Algorithm, q as JWK_oct, S as JWT, T as JWTClaimValidationOptions, R as JWTClaims, Q as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, g as WrapKeyResult } from './shared/unjwt.ClaeEBcy.mjs';
|
|
2
|
+
export { d as deriveKeyFromPassword, c as exportJWKToPEM, e as exportKey, a as generateJWK, g as generateKey, f as getJWKFromSet, b as importJWKFromPEM, i as importKey, u as unwrapKey, w as wrapKey } from './shared/unjwt.Djt8pPsc.mjs';
|
package/dist/jwk.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import './shared/unjwt.
|
|
2
|
-
export {
|
|
1
|
+
import './shared/unjwt.tM5bsBSH.mjs';
|
|
2
|
+
export { h as deriveKeyFromPassword, m as exportJWKToPEM, k as exportKey, f as generateJWK, c as generateKey, b as getJWKFromSet, l as importJWKFromPEM, i as importKey, u as unwrapKey, w as wrapKey } from './shared/unjwt.A5jxFsjh.mjs';
|
package/dist/jws.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CompositeKey,
|
|
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.
|
|
1
|
+
export { C as CompositeKey, f as ContentEncryptionAlgorithm, D as DeriveKeyOptions, e as DeriveKeyReturn, c as GenerateJWKOptions, d as GenerateJWKReturn, G as GenerateKeyAlgorithm, a as GenerateKeyOptions, b as GenerateKeyReturn, t as JWK, O as JWKAlgorithm, P as JWKPEMAlgorithm, J as JWKParameters, u as JWKSet, E as JWK_AES_CBC_HMAC, F as JWK_AES_GCM, B as JWK_AES_GCM_KW, A as JWK_AES_KW, N as JWK_Asymmetric_Algorithm, j as JWK_EC, I as JWK_ECDH_ES, y as JWK_ECDSA, i as JWK_EC_Private, h as JWK_EC_Public, v as JWK_HMAC, p as JWK_OKP, o as JWK_OKP_Private, n as JWK_OKP_Public, L as JWK_OKP_SIGN, H as JWK_PBES2, s as JWK_Private, r as JWK_Public, m as JWK_RSA, z as JWK_RSA_ENC, x as JWK_RSA_PSS, l as JWK_RSA_Private, k as JWK_RSA_Public, w as JWK_RSA_SIGN, M as JWK_Symmetric_Algorithm, q as JWK_oct, S as JWT, T as JWTClaimValidationOptions, R as JWTClaims, Q as JoseHeaderParameters, K as KeyManagementAlgorithm, U as UnwrapKeyOptions, W as WrapKeyOptions, g as WrapKeyResult } from './shared/unjwt.ClaeEBcy.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.fumhLslo.mjs';
|
package/dist/jws.mjs
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import './shared/unjwt.
|
|
2
|
-
import './shared/unjwt.
|
|
3
|
-
|
|
4
|
-
export { s as sign, v as verify } from './shared/unjwt.u3h40Nr-.mjs';
|
|
1
|
+
import './shared/unjwt.A5jxFsjh.mjs';
|
|
2
|
+
import './shared/unjwt.tM5bsBSH.mjs';
|
|
3
|
+
export { s as sign, v as verify } from './shared/unjwt.Bui8we0H.mjs';
|