23 Commits
Author SHA1 Message Date
Filip Skokan d162246556 refactor(types): trim published declaration comments
Signed-off-by: Filip Skokan <[email protected]>
2026-07-30 00:37:15 +02:00
Filip Skokan 101557a764 docs: document consumer-supplied type parameters
Document PayloadType on JWT results and decoders, and KeyType on
dynamic key resolvers so consumers know what each explicit argument
controls. Correct ResolvedKey type-parameter tags in generated docs.

Signed-off-by: Filip Skokan <[email protected]>
2026-07-29 18:50:54 +02:00
Filip Skokan f7ef7912cd docs: correct subpaths and API documentation
Correct subpath names that otherwise lead users to unexported entries,
and fix examples, links, and missing descriptions in published JSDoc.

Use instanceof in JWKS recovery examples so strict TypeScript can
narrow caught errors.

Signed-off-by: Filip Skokan <[email protected]>
2026-07-29 18:50:54 +02:00
Filip Skokan acb2913e8e refactor(types): improve key and result inference
Thread resolver return types through verify and decrypt results. Add
overloads so wrappers can forward either keys or resolvers.

Infer importJWK and generateSecret results from their inputs. Keep JWT
payload generics unconstrained while rejecting known non-object shapes.

Signed-off-by: Filip Skokan <[email protected]>
2026-07-29 18:50:54 +02:00
Filip Skokan 54c3627474 fix(types): correct key resolver and JWT header types
Match the protected header of each resolver callback to the value
supplied by its operation. Expose the members attached to local and
remote JWKS resolvers through named callable interfaces.

Allow `JWTHeaderParameters.b64` to be boolean. A false value is inert
unless "b64" is listed in "crit", so signing and verification accept it.

Signed-off-by: Filip Skokan <[email protected]>
2026-07-29 18:45:03 +02:00
Filip Skokan 8d9ece5c1a fix(types): correct JWK and CryptoKey types
Declare JWK shapes as aliases so they satisfy the implicit index
signatures used by host `JsonWebKey` types. Export the AKP variants,
add "oth", and exclude private members from embedded JWK headers.

Alias the host `CryptoKey` when available and use a checked fallback
otherwise, avoiding both a competing nominal type and an `any` result.
Narrow `KeyObject.type` to the values it can hold.

Signed-off-by: Filip Skokan <[email protected]>
2026-07-29 18:44:48 +02:00
Filip Skokan 79ca7939eb chore: update references to the new RFC editor 2026-07-28 12:19:30 +02:00
Filip Skokan 5fad4fb7bf chore: bump packages 2026-03-19 15:41:14 +01:00
Filip Skokan e9bf92a3f3 chore: bump packages 2026-03-05 11:27:19 +01:00
Filip Skokan 2678f16e32 feat: re-introduce JWE "zip" (Compression Algorithm) Header Parameter support
Uses the CompressionStream/DecompressionStream APIs with "deflate-raw"
to support the "DEF" compression algorithm value.

Decompressed output is limited to 250 KB by default, configurable via the
maxDecompressedLength decrypt option.

Runtimes lacking CompressionStream/DecompressionStream will continue to
throw JOSENotSupported when zip is encountered.
2026-03-05 11:18:43 +01:00
Filip Skokan 721ee2c990 refactor: expose setKeyManagementParameters also on a GeneralEncrypt Recipient 2025-11-09 16:14:13 +01:00
Filip Skokan 1d6192bb27 chore: bump typedoc and typescript 2025-08-29 17:14:21 +02:00
Filip Skokan 1075562aa6 docs: mention the apu/apv parameter names in setKeyManagementParameters 2025-07-08 12:22:25 +02:00
Filip Skokan d8ad0d6b69 docs: use GitHub Flavored Markdown for notes and warnings 2025-05-28 11:18:50 +02:00
Filip Skokan 667ed711bc refactor: hide internal private fields and drop ProduceJWT inheritance 2025-03-11 13:24:38 +01:00
Filip Skokan 5e542d5deb docs: add more symbol document, ignore ts-private fields 2025-03-11 13:24:38 +01:00
Filip Skokan f28ec29549 docs: add various exported symbol descriptions 2025-02-23 19:13:04 +01:00
Filip Skokan c85b085be4 docs: add module tags to all entrypoints 2025-02-22 18:02:50 +01:00
Filip Skokan 7b88293564 docs: re-generate API reference docs 2025-02-22 15:16:04 +01:00
Filip Skokan 2a962aa4c6 chore: upgrade dev dependencies, typescript, and docs 2024-12-03 11:36:05 +01:00
Filip Skokan c24a4a598e docs: update more JWTClaimVerificationOptions descriptions 2024-11-05 14:17:53 +00:00
a53798f9b7 docs: more details for clockTolerance on JWTVerifyOptions (#732)
Co-authored-by: Filip Skokan <[email protected]>
2024-11-05 15:06:37 +01:00
Filip Skokan f4dbf41a1c docs: update docs building dependencies 2024-10-19 14:02:59 +02:00