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]>
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]>
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]>
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]>
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]>
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.