mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-26 04:15:48 -06:00
83900e4683
* feat(browser): add relay authentication v2 * fix(browser): cap relay test WebSocket payload * fix(browser): keep relay E2E inside extension boundary * fix(browser): isolate relay admission and cleanup auth * fix(browser): finish relay auth migration hardening * fix(browser): keep preauth transport bounded through teardown
22 lines
664 B
TypeScript
22 lines
664 B
TypeScript
export const EXTENSION_RELAY_V2_PROTOCOL: string;
|
|
export function parseRelayAuthJson(raw: string): Record<string, unknown> | null;
|
|
export function createExtensionRelayAuthClient(params: {
|
|
token: string;
|
|
relayUrl: string;
|
|
cryptoApi?: Crypto;
|
|
now?: () => number;
|
|
clientNonce?: string;
|
|
}): Promise<{
|
|
readonly keyId: string;
|
|
readonly clientNonce: string;
|
|
readonly authenticated: boolean;
|
|
start(): { type: "auth.hello"; v: 2; keyId: string; clientNonce: string };
|
|
acceptChallenge(message: unknown): Promise<{
|
|
type: "auth.response";
|
|
v: 2;
|
|
sessionId: string;
|
|
clientProof: string;
|
|
}>;
|
|
acceptOk(message: unknown): Promise<void>;
|
|
}>;
|