Account
- Print
Account
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Account Module 1.2.0
Usage
To use the Account module, you can import it into your project from the Firebolt SDK:
import { Account } from '@firebolt-js/manage-sdk'
Overview
A module for querying about the device account.
Methods
session
Used by a distributor to push Session token to firebolt.
function session(token: Token, expiresIn: Expiry): Promise<void>
Parameters:
Param | Type | Required | Description |
---|---|---|---|
token | Token | true | |
expiresIn | Expiry | true | minumum: 1 |
Promise resolution:
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:token:account |
Examples
Default Example
JavaScript:
import { Account } from '@firebolt-js/manage-sdk'
let result = await Account.session(
'RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==',
84000,
)
console.log(result)
Value of result
:
null
JSON-RPC:
Request:{
"jsonrpc": "2.0",
"id": 1,
"method": "Account.session",
"params": {
"token": "RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==",
"expiresIn": 84000
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
Types
Token
Encoded token provided by the Distributor for Device Authentication.
Expiry
Number of secs before the token expires
Was this article helpful?