Skip to content

Edgio/js-ectoken

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

js-ectoken

JavaScript implementation of Edgio token (ectoken)

Table of Contents

Background

JavaScript implementation of the "Edgio Token" (ectoken) - see main repo ectoken for more details.

Install

  1. Clone this repo.
  2. cd into the repo directory
  3. Run npm install

Usage

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)

Contribute

We welcome issues, questions, and pull requests.

License

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.

About

JavaScript implementation of ectoken

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published