Commit graph

158 commits

Author SHA1 Message Date
Filip Skokan
a9f6f71350 feat: keystore filtering by JWK Key thumbprint 2020-01-26 19:31:55 +01:00
Filip Skokan
70ff22227a fix: contactKDF iteration count fixed for key sizes larger than 256 bits 2020-01-25 16:43:53 +01:00
Filip Skokan
3a6d17fdd1 feat: add opt-in support for Unsecured JWS algorithm "none" 2020-01-23 18:38:00 +01:00
Filip Skokan
a0c0c7ad70
feat: add JWTExpired error and JWTClaimInvalid claim and reason props
Resolves #62
2020-01-16 08:49:37 +01:00
Filip Skokan
b1864e319d feat: exposed shorthands for JWT verification profiles 2020-01-12 16:40:51 +01:00
Filip Skokan
bc81e5dec2 fix: expose JOSENotSupported key import errors on unsupported runtimes 2020-01-08 13:17:45 +01:00
Filip Skokan
bb58c9ce52 fix: typo in JOSENotSupported error when x509 certs are not supported 2020-01-07 21:03:00 +01:00
Filip Skokan
3035b8a4f1 docs: fix flattened encrypt docs 2020-01-04 23:19:20 +01:00
Filip Skokan
927118cc47 chore: cleanup 2020-01-01 21:31:20 +01:00
Filip Skokan
828ad5a33d fix: force iat past check when maxTokenAge option is used + JWT refactor 2020-01-01 21:23:05 +01:00
Filip Skokan
7bb5c953a9 feat: add JWT validation profiles for Access Tokens and Logout Tokens 2019-12-31 14:20:52 +01:00
Filip Skokan
0ed5025de3 fix: skip validating iat is in the past when exp is present
validating that iat is in the past is common sense but actually nowhere
defined, in most applications tokens will contain `exp` and for those
it seems requiring a few second leeway just to satisfy `iat` seems
inappropriate
2019-12-17 20:40:23 +01:00
Filip Skokan
11ceb4ef5d chore: add deprecation warning for P-256K 2019-12-17 17:23:00 +01:00
Filip Skokan
10457355e3 refactor: revert the slow Object.freeze 2019-12-11 09:15:13 +01:00
Filip Skokan
bee574457f fix: properly fail to import unsupported openssh keys 2019-12-10 17:06:34 +01:00
Filip Skokan
94ec607d4c refactor: freeze the key's x5c array 2019-12-10 15:20:01 +01:00
Filip Skokan
25a7a71915 feat: importing a certificate populates x5c and x5t thumbprints
closes #59
2019-12-10 14:58:54 +01:00
Filip Skokan
62bdee7b29 refactor: improve error message when JWE "enc" value is invalid 2019-12-06 16:09:49 +01:00
Filip Skokan
8976027c97 refactor: improve error message when key use mismatches the operation 2019-12-06 15:35:15 +01:00
Filip Skokan
daabedc776 fix: handle Unencoded Payload (b64:false) with arbitrary buffer payloads
fixes #57
2019-12-05 20:54:43 +01:00
Filip Skokan
f0d719416e fix: allow PBES2 for the correct JWK use values 2019-12-05 10:33:59 +01:00
Filip Skokan
af635be8ac refactor: allow ECDH-ES to be pluggable with extensions 2019-12-04 11:46:09 +01:00
Filip Skokan
b103874208 refactor: improve extra KW header parameter handling 2019-12-03 19:06:00 +01:00
Filip Skokan
a9f1d4b195 refactor: introduce various registries to prepare for extension modules 2019-12-03 18:54:37 +01:00
Filip Skokan
d5af0c364d refactor: set authTagLength option for Content Encryption with AES GCM
Node uses 16 by default, this is just making it explicit.
2019-12-01 19:01:47 +01:00
Filip Skokan
99eeb43d0e refactor: use dsaEncoding for ECDSA when supported 2019-11-29 10:57:20 +01:00
Filip Skokan
ce77388254 fix: default JWT.sign kid option value is false for HMAC signatures 2019-11-27 22:04:15 +01:00
Filip Skokan
d45f845c45 refactor: backwards compatibility for node < 12 2019-11-27 22:04:15 +01:00
Filip Skokan
3a6906278d refactor: less overhead + truly private API for JWK.Key#algorithms 2019-11-27 22:04:15 +01:00
Filip Skokan
5e1009a63e feat: allow JWK.asKey inputs for sign/verify/encrypt/decrypt operations 2019-11-27 22:04:14 +01:00
Filip Skokan
ea60338ca6 feat: allow JWKS.KeyStore .all and .get to filter for key curves 2019-11-26 16:01:49 +01:00
Filip Skokan
c3eb8450b9 feat: return the CEK from JWE.decrypt operation with { complete: true } 2019-11-23 12:06:15 +01:00
Filip Skokan
6bb66d4f0b feat: add JWS.verify encoding and parsing options 2019-11-05 20:09:34 +01:00
Filip Skokan
8ea968312e feat: expose crypto.KeyObject instances in supported runtimes 2019-11-03 17:27:44 +01:00
Filip Skokan
95882232d6 fix: only use secp256k1 keys for signing/verification 2019-10-29 15:21:57 +01:00
Filip Skokan
6d839c6ed6 refactor: remove Object.assign where ... is possible 2019-10-23 16:44:40 +02:00
Filip Skokan
34b755afcf refactor: xt5 -> x5t 2019-10-17 14:56:53 +02:00
Filip Skokan
0a16efb961 fix: throw proper error when runtime doesn't support OKP
closes #48
2019-10-04 12:21:08 +02:00
Filip Skokan
809e3cb682 ci: coverage with electron 2019-09-26 14:59:57 +02:00
Filip Skokan
1db9fc9cd1 refactor: don't swallow invalid encoding errors 2019-09-25 22:18:47 +02:00
Filip Skokan
81abdfabc5 fix: keystore.toJWKS(true) does not throw on public keys
closes #42
2019-09-16 14:46:38 +02:00
Filip Skokan
06758102b2 refactor: rename node_support to runtime_support 2019-09-10 12:14:15 +02:00
Filip Skokan
2ac7f79463 chore: remove forgotten lib/index.d.ts 2019-09-09 10:47:59 +02:00
Filip Skokan
78398d3cdf feat: allow JWKS.asKeyStore to swallow errors 2019-08-24 22:03:37 +02:00
Filip Skokan
67a8601b09 feat: added Node.js lts/dubnium support for runtime supported features 2019-08-22 20:40:02 +02:00
Filip Skokan
28d7cf8c78 feat: add RSA-OAEP-256 support (when a node version supports it)
resolves #29
2019-08-20 19:22:42 +02:00
Filip Skokan
dd121ce38d fix: properly pad calculated RSA primes 2019-07-29 15:30:25 +02:00
Filip Skokan
e7ad82cbbc feat: electron v6.x support 2019-07-27 21:19:14 +02:00
Filip Skokan
24acd201b6 fix: use the correct ECPrivateKey version when importing EC JWK 2019-07-27 16:35:39 +02:00
Filip Skokan
181fd0954e fix: importing x5c in electron requires the input split 2019-07-27 15:31:24 +02:00