Skip to content

@keymaster/connect / KeymasterConnectOptions

Interface: KeymasterConnectOptions

Configuration for KeymasterConnectClient.

Properties overview

PropertyTypeRequiredDescription
targetOriginstringYesExact Keymaster deployment origin supplied by the host application.
mode?KeymasterConnectModeNopopup for direct integrations; appView for apps launched by Keymaster.
popupPath?stringNoSession Window path relative to targetOrigin.
popupName?stringNoBrowser window name reused by direct integrations.
popupWidth?numberNo
popupHeight?numberNo
readyTimeoutMs?numberNoMaximum wait for a popup-mode ready message.
requestTimeoutMs?numberNoDefault request timeout.
closePollMs?numberNoSession Window close detection interval.
onEvent?(event) => voidNoReceives appmsg.message_received and broadcast.message_received server-pushed events.
onStateChange?(state) => voidNoReceives transport lifecycle changes.
environment?KeymasterBrowserEnvironmentNoOptional browser adapter, normally only supplied by tests.

Properties

targetOrigin

targetOrigin: string

Exact Keymaster deployment origin supplied by the host application.


mode?

optional mode?: KeymasterConnectMode

popup for direct integrations; appView for apps launched by Keymaster.


popupPath?

optional popupPath?: string

Session Window path relative to targetOrigin.


popupName?

optional popupName?: string

Browser window name reused by direct integrations.


popupWidth?

optional popupWidth?: number


popupHeight?

optional popupHeight?: number


readyTimeoutMs?

optional readyTimeoutMs?: number

Maximum wait for a popup-mode ready message. Defaults to 30 seconds.


requestTimeoutMs?

optional requestTimeoutMs?: number

Default request timeout. Defaults to two minutes.


closePollMs?

optional closePollMs?: number

Session Window close detection interval. Defaults to 500ms.


onEvent?

optional onEvent?: (event) => void

Receives appmsg.message_received and broadcast.message_received server-pushed events. Their payloads are respectively AppMsgMessageReceivedEventData and BroadcastMessageReceivedEventData.

Parameters

event

ProtocolEventMessage

Returns

void


onStateChange?

optional onStateChange?: (state) => void

Receives transport lifecycle changes.

Parameters

state

KeymasterConnectState

Returns

void


environment?

optional environment?: KeymasterBrowserEnvironment

Optional browser adapter, normally only supplied by tests.

Capability access without key custody.