Interface: Platform
platform.Platform
Generic interface for various platform APIs
Implemented by
Properties
biometricKeyStore
• biometricKeyStore: BiometricKeyStore
Defined in
crypto
• crypto: CryptoProvider
Defined in
platformAuthType
• Readonly
platformAuthType: null
|
AuthType
Defined in
storage
• storage: Storage
Defined in
supportedAuthTypes
• Readonly
supportedAuthTypes: AuthType
[]
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
}>
Defined in
composeEmail
▸ composeEmail(addr
, subject
, message
): Promise
<void
>
Parameters
Name | Type |
---|---|
addr |
string |
subject |
string |
message |
string |
Returns
Promise
<void
>
Defined in
getClipboard
▸ getClipboard(): Promise
<string
>
Retrieves the current text from the system clipboard
Returns
Promise
<string
>
Defined in
getDeviceInfo
▸ getDeviceInfo():
Promise
<DeviceInfo
>
Get information about the current device
Returns
Promise
<DeviceInfo
>
Defined in
getPlatformAuthToken
▸ getPlatformAuthToken(_purpose
): Promise
<string
>
Parameters
Name | Type |
---|---|
_purpose |
AuthPurpose [] |
Returns
Promise
<string
>
Defined in
openExternalUrl
▸ openExternalUrl(_url
): void
Parameters
Name | Type |
---|---|
_url |
string |
Returns
void
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
>
Defined in
registerPlatformAuthenticator
▸ registerPlatformAuthenticator(purposes
): Promise
<string
>
Parameters
Name | Type |
---|---|
purposes |
AuthPurpose [] |
Returns
Promise
<string
>
Defined in
saveFile
▸ saveFile(name
, type
, contents
): Promise
<void
>
Parameters
Name | Type |
---|---|
name |
string |
type |
string |
contents |
Uint8Array |
Returns
Promise
<void
>
Defined in
scanQR
▸ scanQR(): Promise
<string
>
Returns
Promise
<string
>
Defined in
setClipboard
▸ setClipboard(text
): Promise
<void
>
Copies the given text
to the system clipboard
Parameters
Name | Type |
---|---|
text |
string |
Returns
Promise
<void
>
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
>
Defined in
stopScanQR
▸ stopScanQR(): Promise
<void
>
Returns
Promise
<void
>
Defined in
supportsPlatformAuthenticator
▸ supportsPlatformAuthenticator(): Promise
<boolean
>
Returns
Promise
<boolean
>