Module: SimpleOAuth

Defined in:
lib/simple_oauth.rb,
lib/simple_oauth/errors.rb,
lib/simple_oauth/header.rb,
lib/simple_oauth/parser.rb,
lib/simple_oauth/encoding.rb,
lib/simple_oauth/signature.rb,
lib/simple_oauth/header/class_methods.rb

Overview

OAuth 1.0 header generation and parsing library

SimpleOAuth provides a simple interface for building and verifying OAuth 1.0 Authorization headers per RFC 5849.

Examples:

Building an OAuth header

header = SimpleOAuth::Header.new(
  :get,
  "https://api.example.com/resource",
  {status: "Hello"},
  consumer_key: "key",
  consumer_secret: "secret"
)
header.to_s # => "OAuth oauth_consumer_key=\"key\", ..."

Parsing an OAuth header

parsed = SimpleOAuth::Header.parse('OAuth oauth_consumer_key="key"')
# => {consumer_key: "key"}

See Also:

Defined Under Namespace

Modules: Encoding, Signature Classes: Header, InvalidOptionsError, ParseError, Parser