Class: StubPlatform
platform.StubPlatform
Stub implementation of the Platform interface. Useful for testing
Implements
Constructors
constructor
• new StubPlatform()
Properties
biometricKeyStore
• biometricKeyStore:
StubBiometricKeyStore
Implementation of
Defined in
crypto
• crypto: StubCryptoProvider
Implementation of
Defined in
platformAuthType
• Readonly
platformAuthType: null
|
AuthType
= null
Implementation of
Defined in
storage
• storage: Storage
Implementation of
Defined in
Accessors
supportedAuthTypes
• get
supportedAuthTypes(): AuthType
[]
Returns
AuthType
[]
Implementation of
Defined in
Methods
completeAuthRequest
▸ completeAuthRequest(_req
): Promise
<{ accountStatus
:
AccountStatus
; deviceTrusted
:
boolean
; email
: string
; legacyData?
:
PBES2Container
; provisioning
:
AccountProvisioning
; token
: string
}>
Parameters
Name | Type |
---|---|
_req |
StartAuthRequestResponse |
Returns
Promise
<{ accountStatus
:
AccountStatus
; deviceTrusted
:
boolean
; email
: string
; legacyData?
:
PBES2Container
; provisioning
:
AccountProvisioning
; token
: string
}>
Implementation of
Defined in
composeEmail
▸ composeEmail(_addr
, _subject
, _message
): Promise
<void
>
Parameters
Name | Type |
---|---|
_addr |
string |
_subject |
string |
_message |
string |
Returns
Promise
<void
>
Implementation of
Defined in
getClipboard
▸ getClipboard(): Promise
<string
>
Retrieves the current text from the system clipboard
Returns
Promise
<string
>
Implementation of
Defined in
getDeviceInfo
▸ getDeviceInfo(): Promise
<DeviceInfo
>
Get information about the current device
Returns
Promise
<DeviceInfo
>
Implementation of
Defined in
getPlatformAuthToken
▸ getPlatformAuthToken(_purpose
): Promise
<string
>
Parameters
Name | Type |
---|---|
_purpose |
AuthPurpose [] |
Returns
Promise
<string
>
Implementation of
Defined in
openExternalUrl
▸ openExternalUrl(_url
): void
Parameters
Name | Type |
---|---|
_url |
string |
Returns
void
Implementation of
Defined in
registerAuthenticator
▸ registerAuthenticator(_opts
): Promise
<string
>
Parameters
Name | Type |
---|---|
_opts |
Object |
_opts.data? |
any |
_opts.device? |
DeviceInfo |
_opts.purposes |
AuthPurpose [] |
_opts.type |
AuthType |
Returns
Promise
<string
>
Implementation of
Platform.registerAuthenticator
Defined in
registerPlatformAuthenticator
▸ registerPlatformAuthenticator(_purpose
): Promise
<string
>
Parameters
Name | Type |
---|---|
_purpose |
AuthPurpose [] |
Returns
Promise
<string
>
Implementation of
Platform.registerPlatformAuthenticator
Defined in
saveFile
▸ saveFile(_name
, _type
, _contents
): Promise
<void
>
Parameters
Name | Type |
---|---|
_name |
string |
_type |
string |
_contents |
Uint8Array |
Returns
Promise
<void
>
Implementation of
Defined in
scanQR
▸ scanQR(): Promise
<string
>
Returns
Promise
<string
>
Implementation of
Defined in
setClipboard
▸ setClipboard(_val
): Promise
<void
>
Copies the given text
to the system clipboard
Parameters
Name | Type |
---|---|
_val |
string |
Returns
Promise
<void
>
Implementation of
Defined in
startAuthRequest
▸ startAuthRequest(_opts
):
Promise
<StartAuthRequestResponse
>
Parameters
Name | Type |
---|---|
_opts |
Object |
_opts.authenticatorId? |
string |
_opts.authenticatorIndex? |
number |
_opts.email? |
string |
_opts.purpose |
AuthPurpose |
_opts.type? |
AuthType |
Returns
Promise
<StartAuthRequestResponse
>
Implementation of
Defined in
stopScanQR
▸ stopScanQR(): Promise
<void
>
Returns
Promise
<void
>
Implementation of
Defined in
supportsPlatformAuthenticator
▸ supportsPlatformAuthenticator(): Promise
<boolean
>
Returns
Promise
<boolean
>
Implementation of
Platform.supportsPlatformAuthenticator