Module OAuth::Signature
In: lib/oauth/signature/base.rb
lib/oauth/signature/md5.rb
lib/oauth/signature/plaintext.rb
lib/oauth/signature/sha1.rb
lib/oauth/signature.rb

Methods

Classes and Modules

Module OAuth::Signature::HMAC
Module OAuth::Signature::RSA
Class OAuth::Signature::Base
Class OAuth::Signature::MD5
Class OAuth::Signature::PLAINTEXT
Class OAuth::Signature::SHA1
Class OAuth::Signature::UnknownSignatureMethod

Public Class methods

Returns a list of available signature methods

[Source]

# File lib/oauth/signature.rb, line 4
    def self.available_methods
      @available_methods ||= {}
    end

Build a signature from a request.

Raises UnknownSignatureMethod exception if the signature method is unknown.

[Source]

# File lib/oauth/signature.rb, line 11
    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

Sign a request

[Source]

# File lib/oauth/signature.rb, line 19
    def self.sign(request, options = {}, &block)
      self.build(request, options, &block).signature
    end

Create the signature base string for request. This string is the normalized parameter information.

See Also: OAuth core spec version 1.0, section 9.1.1

[Source]

# File lib/oauth/signature.rb, line 31
    def self.signature_base_string(request, options = {}, &block)
      self.build(request, options, &block).signature_base_string
    end

Verify the signature of request

[Source]

# File lib/oauth/signature.rb, line 24
    def self.verify(request, options = {}, &block)
      self.build(request, options, &block).verify
    end

[Validate]