Easily generate secure digest tokens to use with the Phenix platform without requiring any networking activity.
To install Phenix Edge Authorization Digest Token with composer:
$ composer install
To run the unit tests with composer:
$ composer run test
<?php
namespace EdgeAuthExample;
use EdgeAuth\TokenBuilder;
class Example
{
function __construct()
{
$theToken = (new TokenBuilder())
->withApplicationId('test')
->withSecret('abc')
->expiresInSeconds(300);
$result = $theToken->build();
}
}
Display the help information:
./bin/edgeAuth --help
Create a token for channel access:
./bin/edgeAuth --applicationId "my-application-id" --secret "my-secret" --expiresInSeconds 3600 --channel "us-northeast#my-application-id#my-channel.1345"
Add these entries to your composer.json:
{
.
.
.
"require": {
"phenixrts/edgeauth": "1.2.5"
}
.
.
.
"repositories": [{
"type": "package",
"package": {
"name": "phenixrts/edgeauth",
"type": "zip",
"version": "1.2.5",
"dist": {
"type": "zip",
"url": "https://github.com/PhenixRTS/EdgeAuth/releases/download/php%401.2.4/php@1.2.5.zip"
}
}
}]
.
.
.
}