Account
- Print
Account
- Print
Article summary
Did you find this summary helpful?
Thank you for your feedback
Account Module 0.15.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?: string, expiresIn?: number): Promise<void>
Parameters:
Param | Type | Required | Description |
---|---|---|---|
token | string | false | |
expiresIn | number | false | minumum: 1 |
Promise resolution:
void
Capabilities:
Role | Capability |
---|---|
manages | xrn:firebolt:capability:token:account |
Examples
Default Example
JavaScript:
import { Account } from '@firebolt-js/manage-sdk'
Account.session("RmlyZWJvbHQgTWFuYWdlIFNESyBSb2NrcyEhIQ==", 84000)
.then(result => {
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.
type Token = string
Expiry
Number of secs before the token expires
type Expiry = number
Was this article helpful?