Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@555platform/555-connection
Advanced tools
555-connection provides simple APIs to make connection with 555 Platform.
npm i @555platform/555-connection
import SDK from '@555platform/555-connection';
Make connection using 555token
, ConnectOptions
and MessageAdapter
const sdk = SDK.Client.create(
userData.access_token,
{
url: '',
automaticReconnect: true
},
new SDK.QueuedMessageAdapter<SDK.MessagePayload>()
);
sdk.connect();
Callbacks
sdk.onTokenAboutToExpire(() =>
// renewToken is a function you need to implement to fetch new token
// from application server
renewToken(renewedToken => sdk.updateToken(renewedToken));
);
Factory method to create and initialize Client
Parameters
Name | Type | Argument | Description |
---|---|---|---|
accessToken | string | required | 555 Platform access token |
options | ConnectOptions | required | Options to customize 555 Connection behavior |
messageAdapter | MessageAdapter | required | Message adapter class conforming to MessageAdapter interface |
Returns
Type
Client|Error
Updates current token. Used to update Client with refreshed token.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
accessToken | string | required | 555 Platform access token |
Returns
Type
void
Connect to platform.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
options | ConnectOptions | optional | Connection options |
Returns
Type
Promise.<Client|void>
Manually disconnect the client.
Returns
Type
Promise.<void|Error>
Triggered 5 minutes before access token is to expire.
client.onTokenAboutToExpire(() =>
// renewToken is a function you need to implement to fetch new token
// from application server
renewToken(renewedToken => sdk.updateToken(renewedToken));
);
These options are parameters for connecting to platform.
Type
Object
Properties
Name | Type | Argument |
---|---|---|
url | string | required |
protocol | string[] | optional |
automaticReconnect | boolean | optional |
reconnectionAttempts | number | optional |
reconnectDelay | number | optional |
reconnectBackoffAlgorithm | BackoffAlgorithm | optional |
pollInterval | number | optional |
requestTimeout | number | optional |
requestRetries | number | optional |
paginatorDefaultPageSize | number | optional |
nextPingDelay | number | optional |
pingWaitDelay | number | optional |
FAQs
JavaScript SDK for 555 Connection
The npm package @555platform/555-connection receives a total of 0 weekly downloads. As such, @555platform/555-connection popularity was classified as not popular.
We found that @555platform/555-connection demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.