
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
opentok-token
Advanced tools
Generates tokens for `X-TB-TOKEN-AUTH` header when using OpenTok REST API.
Generates tokens for X-TB-TOKEN-AUTH
header when using OpenTok REST API.
npm install --save opentok-token
WARNING: This module does not check for the validity of the data being encoded into the token. It doesn't know about the OpenTok REST API semantics, and you can encode data that doesn't result in a valid token. Its merely a utility. Use the OpenTok Node Server SDK for a more complete module.
var encodeToken = require('opentok-token');
var tokenData = {
session_id: 'SESSIONID',
create_time: 1424221013,
nonce: 50885,
role: 'moderator',
expire_time: 1424307413,
connection_data: '{"name":"value"}'
};
var apiKey = 'APIKEY';
var apiSecret = 'APISECRET'
var token = encodeToken(tokenData, apiKey, apiSecret);
NOTE: The API key, secret, and session ID above are not real.
If you do not specify certain properties of the tokenData
parameter, defaults will be applied for
you.
Property | Type | Default |
---|---|---|
create_time | unix timestamp in seconds (integer) | now |
expire_time | unix timestamp in seconds (integer) | now + 1 day |
role | string | 'publisher' |
nonce | number | unique random number |
FAQs
Generates tokens for `X-TB-TOKEN-AUTH` header when using OpenTok REST API.
The npm package opentok-token receives a total of 16,843 weekly downloads. As such, opentok-token popularity was classified as popular.
We found that opentok-token demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.