Module: Riddl::Roles::OAuth::OnBehalf

Defined in:
lib/ruby/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb

Constant Summary collapse

WANTED =
[:consumer_key, :consumer_secret, :token, :token_secret]

Class Method Summary collapse

Class Method Details

.before(fullpath, method, parameters, headers, options) ⇒ Object



10
11
12
13
14
15
# File 'lib/ruby/riddl/roles/http%3A%2F%2Foauth.net%2F1.0%2Fon_behalf.rb', line 10

def self::before(fullpath,method,parameters,headers,options)
  unless WANTED.all?{ |e| options.has_key?(e) }
    raise ArgumentError, "Riddl::Options have to include: #{WANTED.join(', ')}"
  end
  Riddl::Roles::OAuth::sign(fullpath,method,parameters,headers,options)
end