This is a partial implementation of Akamai's HMAC token auth (Akamai Docs)
It's currently untested, and only supports URL tokens.
tokenGenerator := EdgeAuthToken {
Key: "adf765d7854adfdf", //Shared Key as a hex string (required)
WindowSeconds: 300, //Number of seconds the token should be valid (default 300)
ClientIP: "127.127.127.127", //IP address of the client that will be using the token (optional)
}
token, err := tokenGenerator.GenerateURLToken("/path/to/my/asset")
//token can then be added to the final URL to be sent to the client
// eg: "https://akamaidomain/path/to/my/asset?__token__=<token>"
// where <token> is the value obtained above