Skip to content

Instantly share code, notes, and snippets.

@repocers
repocers / AkamaiToken
Created April 29, 2013 17:50
Akamai token generation for ruby applications.
require "cgi"
class AkamaiTokenConfig
attr_accessor :window, :session_id, :data, :salt, :field_delimiter, :early_url_encoding, :ip
attr_reader :start_time, :hash_strategy, :acl, :url
def initialize(config={})
@ip = ''
self.start_time = Time.now.to_i
self.acl = '/*'