zephyr-agent
Version:
Zephyr plugin agent
18 lines • 733 B
TypeScript
/**
* Returns a base64url session key to be used in a login process.
*
* This uses a sync-lock to ensure that multiple concurrent login processes uses the same
* session key so once the first login is completed, the other concurrent logins also get
* authorized without doing anything else than waiting in the same websocket room.
*/
export declare function getSessionKey(): SessionLock;
export interface SessionLock extends Disposable {
readonly owner: boolean;
readonly session: string;
}
/**
* Checks if the lock is still held by the current process and resolves when the lock is
* released.
*/
export declare function waitForUnlock(signal?: AbortSignal): Promise<void>;
//# sourceMappingURL=session-lock.d.ts.map