@ractive-ch/tab-mcp 0.5.1 → 0.6.1
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/README.md +22 -3
- package/index.js +775 -170
- package/index.js.map +12 -10
- package/jwt.d.ts +10 -2
- package/main.js +775 -170
- package/main.js.map +12 -10
- package/oauth/cimd.d.ts +49 -4
- package/oauth/client-auth.d.ts +86 -0
- package/oauth/domain-cache.d.ts +24 -0
- package/oauth/server.d.ts +1 -0
- package/package.json +2 -2
- package/relay.d.ts +6 -0
- package/store/memory.d.ts +13 -0
- package/store/sqlite.d.ts +2 -0
- package/store/types.d.ts +17 -0
- package/testing.d.ts +33 -2
- package/testing.js +5863 -1
- package/testing.js.map +28 -4
- package/tokens.d.ts +4 -1
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
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|