https://github.com/rfrench/ectoken-go
Token Generator for EdgeCast Token-Based Authentication
https://github.com/rfrench/ectoken-go
authentication ectoken edgecast go golang token vdms
Last synced: 10 months ago
JSON representation
Token Generator for EdgeCast Token-Based Authentication
- Host: GitHub
- URL: https://github.com/rfrench/ectoken-go
- Owner: rfrench
- License: apache-2.0
- Created: 2018-04-19T23:23:46.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-06-13T18:58:33.000Z (almost 6 years ago)
- Last Synced: 2025-03-22T16:13:11.196Z (about 1 year ago)
- Topics: authentication, ectoken, edgecast, go, golang, token, vdms
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/rfrench/ectoken-go)

# Token Generator for Edgecast Token-Based Authentication
Token-Based Authentication safeguards against hotlinking by adding a token requirement to requests for content secured by it. This token, which must be defined in the request URL's query string, defines the criteria that must be met before the requested content may be served via the CDN. This repository contains the following token generation resources:
- [Linux binaries and Windows executable](https://github.com/VerizonDigital/ectoken/releases/latest)
## Functions
```go
Encrypt(key string, params string, verbose bool)
Decrypt(key string, token string, verbose bool)
```
## Install
First use "go get" to install the latest version of the library.
$ go get github.com/VerizonDigital/ectoken-go
## Example
```go
import "github.com/VerizonDigital/ectoken-go/v3"
// encrypt
token, err := v3.Encrypt("keyvalue", "ec_expire=1257642471&ec_clientip=11.22.33.1", false)
if err != nil {
log.Fatal(err)
}
// decrypt
params, err := v3.Decrypt("keyvalue", token, false)
if err != nil {
log.Fatal(err)
}
```
## Contributing
Contributions are welcome! Please review our [contribution guidelines](CONTRIBUTING.md).
## More Information
Please refer to the CDN Help Center, which is available from within the MCC, for more information (e.g., parameter names and usage).
## License
[View legal and licensing information.](LICENSE.txt)
## Other Languages & Documentation
You can find implementations of EC Token in other languages and further documentation on the [EC Token Repo](https://github.com/hattan/ectoken).