Skip to content

Type Alias: KeyStore2MR

KeyStore2MR = { challengeValidate: (args: { authFactor: TmrAuthFactor; challenge: string; sessionId: string; userId?: string; }) => Promise<{ newSessionId: string; }>; extraHeaders: Record<string, string>; getFactorToken: (args: { authFactor: TmrAuthFactor; sessionId: string; userId?: string; }) => Promise<string>; push: (args: { appId?: string; authFactor: TmrAuthFactor; data: Buffer; rawTwoManRuleKey?: string; sessionId: string; twoManRuleKey?: string; userId?: string; }) => Promise<string>; search: (args: { appId?: string; rawTwoManRuleKey?: string; sessionId: string; twoManRuleKey?: string; userId?: string; }) => Promise<{ authenticated: boolean; data: Buffer; }>; }

Internal interface to the SSKS two-man rule API.

WARNING: Do not use directly.

Properties

challengeValidate()

challengeValidate: (args: { authFactor: TmrAuthFactor; challenge: string; sessionId: string; userId?: string; }) => Promise<{ newSessionId: string; }>

Parameters

args
authFactor

TmrAuthFactor

challenge

string

sessionId

string

userId?

string

Returns

Promise<{ newSessionId: string; }>


extraHeaders

extraHeaders: Record<string, string>


getFactorToken()

getFactorToken: (args: { authFactor: TmrAuthFactor; sessionId: string; userId?: string; }) => Promise<string>

Parameters

args
authFactor

TmrAuthFactor

sessionId

string

userId?

string

Returns

Promise<string>


push()

push: (args: { appId?: string; authFactor: TmrAuthFactor; data: Buffer; rawTwoManRuleKey?: string; sessionId: string; twoManRuleKey?: string; userId?: string; }) => Promise<string>

Parameters

args
appId?

string

authFactor

TmrAuthFactor

data

Buffer

rawTwoManRuleKey?

string

sessionId

string

twoManRuleKey?

string

userId?

string

Returns

Promise<string>


search: (args: { appId?: string; rawTwoManRuleKey?: string; sessionId: string; twoManRuleKey?: string; userId?: string; }) => Promise<{ authenticated: boolean; data: Buffer; }>

Parameters

args
appId?

string

rawTwoManRuleKey?

string

sessionId

string

twoManRuleKey?

string

userId?

string

Returns

Promise<{ authenticated: boolean; data: Buffer; }>