JavaScript implementation of Edgio token (
ectoken
)
JavaScript implementation of the "Edgio Token" (ectoken
) - see main repo ectoken for more details.
- Clone this repo.
cd
into the repo directory- Run
npm install
This library is provided in CommonJS (CJS) format. To include the library in a script, require
it:
const { ECToken, encrypt, decrypt } = require('./ECToken.js')
const ec_token = new ECToken()
ec_token.addValue('ec_country_allow', 'US')
// Add additional directives in the same way.
const token = await encrypt('my-secret-key', ec_token)
const plaintext = await decrypt('my-secret-key', token)
We welcome issues, questions, and pull requests.
This project is licensed under the terms of the Apache 2.0 open source license. Please refer to the License-2.0.txt
file for the full terms.