- Notifications
You must be signed in to change notification settings - Fork0
Generate tokens for securing content distributed with the Fastly CDN
License
NotificationsYou must be signed in to change notification settings
zencoder/fastly-tokens
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Generate tokens for securing content distributed with the Fastly CDN, in go!
Install thefastly-tokens library:go get github.com/zencoder/fastly-tokens/ft
package mainimport ("encoding/base64""fmt""log""time""github.com/zencoder/fastly-tokens/ft")funcmain() {// Generate token that is valid for 60 seconds using the default secrettoken:=ft.GenerateToken("RmFzdGx5IFRva2VuIFRlc3Q=",60*time.Second,base64.StdEncoding)fmt.Printf("Token: %s\n",token)}
BenchmarkGenerateToken-8 1000000 1771 ns/op 848 B/op 12 allocs/opPASSok github.com/zencoder/fastly-tokens/ft2.101s
Tested on go 1.13
makeAbout
Generate tokens for securing content distributed with the Fastly CDN
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.