Module: Xpost::Authentication

Defined in:
lib/xpost/authentication.rb

Class Method Summary collapse

Class Method Details

.authenticate(api_key, secret_key) ⇒ Object



7
8
9
10
11
# File 'lib/xpost/authentication.rb', line 7

def self.authenticate(api_key, secret_key)
  payload   = payload(api_key)
  signature = signature(header, payload, secret_key)
  token     = "#{header}.#{payload}.#{signature}"
end

.sample_auth_tokenObject



13
14
15
16
# File 'lib/xpost/authentication.rb', line 13

def self.sample_auth_token
  config = Xpost::Configuration.sample_configuration
  Xpost::Authentication.authenticate(config.api_key, config.secret_key)
end