1.1.0 • Published 11 months ago

wowza-generate-token v1.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

wowza-secure-token

Javascript library to create secure token for Wowza server

Install via npm :

npm i wowza-generate-token

Example :

const { WowzaGenerateToken } = require('wowza-generate-token')

const token = new WowzaGenerateToken('wowzaprefix','mySharedSecret');
token.setClientIP('192.168.1.1');
token.setURL('https://r1.test.com:443/vod_test/_definst_/mehdi/kiasalar/2/smil:hd_test.smil/playlist.m3u8');

token.setHashMethod(WowzaGenerateToken.SHA256);

const startTime = Math.floor(Date.now() / 1000);
const endTime = Math.floor(Date.now() / 1000) + (3 * 60 * 60); //3 hours

token.setExtraParams({ endtime: endTime, starttime: startTime, CustomParam1 : 'CustomValue' });

const secureToken = token.getHash();
const securedURL = token.getFullURL();
console.log(securedURL)
1.1.0

11 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago