Sha256: cbfcbc4a83a1d911cfc3d9eb3c0467c32d175296d141c1eb70d9858a52f68121

Contents?: true

Size: 835 Bytes

Versions: 37

Compression:

Stored size: 835 Bytes

Contents

module OAuth
  module Signature
    def self.available_methods
      @available_methods ||= {}
    end

    def self.build(request, options = {}, &block)
      request = OAuth::RequestProxy.proxy(request, options)
      klass = available_methods[(request.signature_method || "").downcase]
      raise UnknownSignatureMethod, request.signature_method unless klass
      klass.new(request, options, &block)
    end

    def self.sign(request, options = {}, &block)
      self.build(request, options, &block).signature
    end

    def self.verify(request, options = {}, &block)
      self.build(request, options, &block).verify
    end

    def self.signature_base_string(request, options = {}, &block)
      self.build(request, options, &block).signature_base_string
    end

    class UnknownSignatureMethod < Exception; end
  end
end

Version data entries

37 entries across 37 versions & 10 rubygems

Version Path
metavida-oauth-0.3.2.1 lib/oauth/signature.rb
metavida-oauth-0.3.2 lib/oauth/signature.rb
mojodna-oauth-0.3.1.1 lib/oauth/signature.rb
mojodna-oauth-0.3.1.2 lib/oauth/signature.rb
mojodna-oauth-0.3.1.3 lib/oauth/signature.rb
mojodna-oauth-0.3.1.4 lib/oauth/signature.rb
mojodna-oauth-0.3.1.5 lib/oauth/signature.rb
mojodna-oauth-0.3.1.6 lib/oauth/signature.rb
mojodna-oauth-0.3.1.7 lib/oauth/signature.rb
mojodna-oauth-0.3.1.8 lib/oauth/signature.rb
mojodna-oauth-0.3.2.1 lib/oauth/signature.rb
mojodna-oauth-0.3.2.2 lib/oauth/signature.rb
mojodna-oauth-0.3.2 lib/oauth/signature.rb
monkeyhelper-oauth-0.3.1 lib/oauth/signature.rb
pelle-oauth-0.2.6 lib/oauth/signature.rb
pelle-oauth-0.2.7 lib/oauth/signature.rb
pelle-oauth-0.3.0 lib/oauth/signature.rb
pelle-oauth-0.3.1 lib/oauth/signature.rb
proletarian-oauth-0.3.2 lib/oauth/signature.rb
proletarian-oauth-0.3.3 lib/oauth/signature.rb