Comparing version 4.10.0 to 4.10.1
import type { JWK } from '../types'; | ||
/** | ||
* Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint as per | ||
* [RFC7638](https://www.rfc-editor.org/rfc/rfc7638). | ||
* Calculates a base64url-encoded JSON Web Key (JWK) Thumbprint | ||
* | ||
@@ -21,7 +20,9 @@ * @example Usage | ||
* @param jwk JSON Web Key. | ||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is "sha256". | ||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is | ||
* "sha256". | ||
* @see [RFC7638](https://www.rfc-editor.org/rfc/rfc7638) | ||
*/ | ||
export declare function calculateJwkThumbprint(jwk: JWK, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>; | ||
/** | ||
* Calculates a JSON Web Key (JWK) Thumbprint URI as per [RFC9278](https://www.rfc-editor.org/rfc/rfc9278). | ||
* Calculates a JSON Web Key (JWK) Thumbprint URI | ||
* | ||
@@ -43,4 +44,6 @@ * @example Usage | ||
* @param jwk JSON Web Key. | ||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is "sha256". | ||
* @param digestAlgorithm Digest Algorithm to use for calculating the thumbprint. Default is | ||
* "sha256". | ||
* @see [RFC9278](https://www.rfc-editor.org/rfc/rfc9278) | ||
*/ | ||
export declare function calculateJwkThumbprintUri(jwk: JWK, digestAlgorithm?: 'sha256' | 'sha384' | 'sha512'): Promise<string>; |
@@ -14,3 +14,6 @@ import type { JWSHeaderParameters, FlattenedJWSInput, GetKeyFunction } from '../types'; | ||
cooldownDuration?: number; | ||
/** Maximum time (in milliseconds) between successful HTTP requests. Default is 600000 (10 minutes). */ | ||
/** | ||
* Maximum time (in milliseconds) between successful HTTP requests. Default is 600000 (10 | ||
* minutes). | ||
*/ | ||
cacheMaxAge?: number | typeof Infinity; | ||
@@ -29,5 +32,2 @@ /** | ||
} | ||
interface URL { | ||
href: string; | ||
} | ||
/** | ||
@@ -37,3 +37,4 @@ * Returns a function that resolves to a key object downloaded from a remote endpoint returning a | ||
* must match the selection process. The JSON Web Key Set is fetched when no key matches the | ||
* selection process but only as frequently as the `cooldownDuration` option allows, to prevent abuse. | ||
* selection process but only as frequently as the `cooldownDuration` option allows, to prevent | ||
* abuse. | ||
* | ||
@@ -57,2 +58,1 @@ * @example Usage | ||
export declare function createRemoteJWKSet(url: URL, options?: RemoteJWKSetOptions): GetKeyFunction<JWSHeaderParameters, FlattenedJWSInput>; | ||
export {}; |
@@ -50,5 +50,6 @@ import type { JWTPayload } from '../types'; | ||
* | ||
* @param input "iat" (Issued At) Claim value to set on the JWT Claims Set. Default is current timestamp. | ||
* @param input "iat" (Issued At) Claim value to set on the JWT Claims Set. Default is current | ||
* timestamp. | ||
*/ | ||
setIssuedAt(input?: number): this; | ||
} |
@@ -371,3 +371,3 @@ /** | ||
* | ||
* This makes the "Extension Header Parameter "${parameter}" is not recognized" error go away. | ||
* This makes the "Extension Header Parameter "..." is not recognized" error go away. | ||
* | ||
@@ -382,3 +382,4 @@ * Use this when a given JWS/JWT/JWE profile requires the use of proprietary non-registered "crit" | ||
* The JWS extension Header Parameter `b64` is always recognized and processed properly. No other | ||
* registered Header Parameters that need this kind of default built-in treatment are currently available. | ||
* registered Header Parameters that need this kind of default built-in treatment are currently | ||
* available. | ||
*/ | ||
@@ -465,3 +466,4 @@ crit?: { | ||
* A list of accepted JWS "alg" (Algorithm) Header Parameter values. By default all "alg" | ||
* (Algorithm) values applicable for the used key/secret are allowed. Note: "none" is never accepted. | ||
* (Algorithm) values applicable for the used key/secret are allowed. Note: "none" is never | ||
* accepted. | ||
*/ | ||
@@ -476,6 +478,14 @@ algorithms?: string[] | ||
export interface JWTPayload { | ||
/** JWT Issuer - [RFC7519#section-4.1.1](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.1). */ | ||
/** | ||
* JWT Issuer | ||
* | ||
* @see [RFC7519#section-4.1.1](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.1) | ||
*/ | ||
iss?: string | ||
/** JWT Subject - [RFC7519#section-4.1.2](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.2). */ | ||
/** | ||
* JWT Subject | ||
* | ||
* @see [RFC7519#section-4.1.2](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.2) | ||
*/ | ||
sub?: string | ||
@@ -486,12 +496,28 @@ | ||
/** JWT ID - [RFC7519#section-4.1.7](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.7). */ | ||
/** | ||
* JWT ID | ||
* | ||
* @see [RFC7519#section-4.1.7](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.7) | ||
*/ | ||
jti?: string | ||
/** JWT Not Before - [RFC7519#section-4.1.5](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.5). */ | ||
/** | ||
* JWT Not Before | ||
* | ||
* @see [RFC7519#section-4.1.5](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.5) | ||
*/ | ||
nbf?: number | ||
/** JWT Expiration Time - [RFC7519#section-4.1.4](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4). */ | ||
/** | ||
* JWT Expiration Time | ||
* | ||
* @see [RFC7519#section-4.1.4](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.4) | ||
*/ | ||
exp?: number | ||
/** JWT Issued At - [RFC7519#section-4.1.6](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6). */ | ||
/** | ||
* JWT Issued At | ||
* | ||
* @see [RFC7519#section-4.1.6](https://www.rfc-editor.org/rfc/rfc7519#section-4.1.6) | ||
*/ | ||
iat?: number | ||
@@ -498,0 +524,0 @@ |
{ | ||
"name": "jose", | ||
"version": "4.10.0", | ||
"version": "4.10.1", | ||
"description": "'JSON Web Almost Everything' - JWA, JWS, JWE, JWT, JWK, JWKS for Node.js, Browser, Cloudflare Workers, Deno, and other Web-interoperable runtimes", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -99,27 +99,2 @@ # jose | ||
#### Semver? | ||
**Yes.** All module's public API is subject to [Semantic Versioning 2.0.0](https://semver.org/spec/v2.0.0.html). | ||
#### How is it different from [`jws`](https://github.com/brianloveswords/node-jws), [`jwa`](https://github.com/brianloveswords/node-jwa) or [`jsonwebtoken`](https://github.com/auth0/node-jsonwebtoken)? | ||
- it supports Browser, Deno, Cloudflare Workers, and other Web-interoperable runtimes | ||
- it supports encrypted JWTs (i.e. in JWE format) | ||
- supports secp256k1, Ed25519, Ed448, X25519, and X448 | ||
- it supports JWK Key Format for all four key types (oct, RSA, EC and OKP) | ||
- it is exclusively using native platform Key object representations (CryptoKey and KeyObject) | ||
- there is JSON Web Encryption support | ||
- it supports the General and Flattened JSON Serialization Syntaxes | ||
- it supports the "crit" member validations to make sure extensions are handled correctly | ||
#### How is it different from [`node-jose`](https://github.com/cisco/node-jose)? | ||
`node-jose` is built to work in any javascript runtime, to be able to do that it packs a lot of | ||
polyfills and javascript implementation code in the form of | ||
[`node-forge`](https://github.com/digitalbazaar/forge), this significantly increases the footprint | ||
of the modules with dependencies that either aren't ever used or have native implementation available | ||
in the runtime already, those are often times faster and more reliable. | ||
- supports secp256k1, Ed25519, Ed448, X25519, and X448 | ||
#### Uint8Array?! | ||
@@ -126,0 +101,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
13780
554942
137