@ractive-ch/tab-mcp 0.5.1 → 0.6.0

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/jwt.d.ts CHANGED
@@ -35,6 +35,7 @@ export interface DecodedJwt {
35
35
  }
36
36
  /** Split and decode a compact JWS (no signature check). */
37
37
  export declare function decodeJwt(token: string): DecodedJwt;
38
+ export declare function isAlgorithm(v: unknown): v is JwtAlgorithm;
38
39
  /** A source of verification keys (a JWKS URL in production). */
39
40
  export interface KeySource {
40
41
  /** Keys for `kid`; may fetch again when the kid is unknown. */
@@ -50,14 +51,21 @@ export declare class HttpJsonError extends Error {
50
51
  }
51
52
  /**
52
53
  * A JWKS URL, cached 10 minutes, fetched again for an unknown kid at most every
53
- * 30 s. After a failed fetch the last good keys are served for up to an hour
54
+ * 5 s. After a failed fetch the last good keys are served for up to an hour
54
55
  * (an outage must not refuse every token at once), and the next attempt waits
55
- * the same 30 s, so a dead endpoint is not hit (and waited for) on every check.
56
+ * 30 s, so a dead endpoint is not hit (and waited for) on every check. An
57
+ * unknown kid that could not be looked for again throws (the keys are
58
+ * unavailable) rather than answering "no such key".
56
59
  */
57
60
  export declare class JwksCache implements KeySource {
58
61
  #private;
62
+ /**
63
+ * `load` fetches the document; the default suits an operator-configured
64
+ * URL. A URL a client chose needs the SSRF-guarded fetch (DEC-106).
65
+ */
59
66
  constructor(url: string | (() => Promise<string>), options?: {
60
67
  now?: () => number;
68
+ load?: (url: string) => Promise<unknown>;
61
69
  });
62
70
  keys(kid: string | undefined): Promise<Jwk[]>;
63
71
  }