Easily generate secure digest tokens to use with the Phenix platform without requiring any networking activity.
To install Phenix Edge Authorization Digest Token with npm:
$ npm install phenix-edge-auth --save
const TokenBuilder = require('phenix-edge-auth');
// Create a token to access a channel
const token = new TokenBuilder()
.withApplicationId('my-application-id')
.withSecret('my-secret')
.expiresInSeconds(3600)
.forChannel('us-northeast#my-application-id#my-channel.1345')
.build();
Display the help information:
node src/edgeAuth.js --help
Create a token for channel access:
node src/edgeAuth.js --applicationId "my-application-id" --secret "my-secret" --expiresInSeconds 3600 --channel "us-northeast#my-application-id#my-channel.1345"