oauth 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of oauth might be problematic. Click here for more details.

Files changed (50) hide show
  1. data/History.txt +35 -17
  2. data/Manifest.txt +13 -1
  3. data/README.rdoc +5 -7
  4. data/Rakefile +6 -4
  5. data/TODO +18 -0
  6. data/bin/oauth +1 -1
  7. data/examples/yql.rb +44 -0
  8. data/lib/oauth.rb +1 -0
  9. data/lib/oauth/cli.rb +201 -31
  10. data/lib/oauth/client/action_controller_request.rb +13 -12
  11. data/lib/oauth/client/helper.rb +10 -14
  12. data/lib/oauth/client/net_http.rb +25 -22
  13. data/lib/oauth/consumer.rb +164 -110
  14. data/lib/oauth/errors.rb +3 -0
  15. data/lib/oauth/errors/error.rb +4 -0
  16. data/lib/oauth/errors/problem.rb +14 -0
  17. data/lib/oauth/errors/unauthorized.rb +12 -0
  18. data/lib/oauth/helper.rb +44 -6
  19. data/lib/oauth/oauth.rb +7 -0
  20. data/lib/oauth/oauth_test_helper.rb +12 -13
  21. data/lib/oauth/request_proxy/action_controller_request.rb +5 -6
  22. data/lib/oauth/request_proxy/base.rb +95 -45
  23. data/lib/oauth/request_proxy/jabber_request.rb +1 -2
  24. data/lib/oauth/request_proxy/mock_request.rb +8 -0
  25. data/lib/oauth/request_proxy/net_http.rb +2 -2
  26. data/lib/oauth/request_proxy/rack_request.rb +7 -7
  27. data/lib/oauth/server.rb +31 -33
  28. data/lib/oauth/signature/base.rb +23 -21
  29. data/lib/oauth/signature/hmac/base.rb +1 -1
  30. data/lib/oauth/signature/hmac/sha1.rb +0 -1
  31. data/lib/oauth/signature/plaintext.rb +2 -2
  32. data/lib/oauth/signature/rsa/sha1.rb +5 -4
  33. data/lib/oauth/token.rb +6 -136
  34. data/lib/oauth/tokens/access_token.rb +68 -0
  35. data/lib/oauth/tokens/consumer_token.rb +32 -0
  36. data/lib/oauth/tokens/request_token.rb +28 -0
  37. data/lib/oauth/tokens/server_token.rb +9 -0
  38. data/lib/oauth/tokens/token.rb +17 -0
  39. data/lib/oauth/version.rb +1 -1
  40. data/oauth.gemspec +12 -6
  41. data/test/cases/spec/1_0-final/test_construct_request_url.rb +1 -1
  42. data/test/test_access_token.rb +28 -0
  43. data/test/test_action_controller_request_proxy.rb +17 -0
  44. data/test/test_consumer.rb +3 -4
  45. data/test/test_helper.rb +0 -5
  46. data/test/test_request_token.rb +53 -0
  47. data/test/test_server.rb +1 -1
  48. data/website/index.html +2 -2
  49. metadata +37 -4
  50. data/specs.txt +0 -13
@@ -0,0 +1,32 @@
1
+ module OAuth
2
+ # Superclass for tokens used by OAuth Clients
3
+ class ConsumerToken < Token
4
+ attr_accessor :consumer, :params
5
+ attr_reader :response
6
+
7
+ def self.from_hash(consumer, hash)
8
+ token = self.new(consumer, hash[:oauth_token], hash[:oauth_token_secret])
9
+ token.params = hash
10
+ token
11
+ end
12
+
13
+ def initialize(consumer, token="", secret="")
14
+ super(token, secret)
15
+ @consumer = consumer
16
+ end
17
+
18
+ # Make a signed request using given http_method to the path
19
+ #
20
+ # @token.request(:get, '/people')
21
+ # @token.request(:post, '/people', @person.to_xml, { 'Content-Type' => 'application/xml' })
22
+ #
23
+ def request(http_method, path, *arguments)
24
+ @response = consumer.request(http_method, path, self, {}, *arguments)
25
+ end
26
+
27
+ # Sign a request generated elsewhere using Net:HTTP::Post.new or friends
28
+ def sign!(request, options = {})
29
+ consumer.sign!(request, self, options)
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,28 @@
1
+ module OAuth
2
+ # The RequestToken is used for the initial Request.
3
+ # This is normally created by the Consumer object.
4
+ class RequestToken < ConsumerToken
5
+
6
+ # Generate an authorization URL for user authorization
7
+ def authorize_url(params = nil)
8
+ params = (params || {}).merge(:oauth_token => self.token)
9
+ build_authorize_url(consumer.authorize_url, params)
10
+ end
11
+
12
+ # exchange for AccessToken on server
13
+ def get_access_token(options = {})
14
+ response = consumer.token_request(consumer.http_method, (consumer.access_token_url? ? consumer.access_token_url : consumer.access_token_path), self, options)
15
+ OAuth::AccessToken.from_hash(consumer, response)
16
+ end
17
+
18
+ protected
19
+
20
+ # construct an authorization url
21
+ def build_authorize_url(base_url, params)
22
+ uri = URI.parse(base_url.to_s)
23
+ # TODO doesn't handle array values correctly
24
+ uri.query = params.map { |k,v| [k, CGI.escape(v)] * "=" } * "&"
25
+ uri.to_s
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,9 @@
1
+ module OAuth
2
+ # Used on the server for generating tokens
3
+ class ServerToken < Token
4
+
5
+ def initialize
6
+ super(generate_key(16), generate_key)
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ module OAuth
2
+ # Superclass for the various tokens used by OAuth
3
+ class Token
4
+ include OAuth::Helper
5
+
6
+ attr_accessor :token, :secret
7
+
8
+ def initialize(token, secret)
9
+ @token = token
10
+ @secret = secret
11
+ end
12
+
13
+ def to_query
14
+ "oauth_token=#{escape(token)}&oauth_secret=#{escape(secret)}"
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module OAuth #:nodoc:
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{oauth}
5
- s.version = "0.3.1"
5
+ s.version = "0.3.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Pelle Braendgaard", "Blaine Cook", "Larry Halff", "Jesse Clark", "Jon Crosby", "Seth Fitzsimmons"]
9
- s.date = %q{2009-01-26}
9
+ s.date = %q{2009-03-23}
10
10
  s.default_executable = %q{oauth}
11
11
  s.description = %q{OAuth Core Ruby implementation}
12
- s.email = %q{pelleb@gmail.com}
12
+ s.email = %q{oauth-ruby@googlegroups.com}
13
13
  s.executables = ["oauth"]
14
- s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "specs.txt", "website/index.txt"]
15
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "Rakefile", "TODO", "bin/oauth", "lib/oauth.rb", "lib/oauth/cli.rb", "lib/oauth/client.rb", "lib/oauth/client/action_controller_request.rb", "lib/oauth/client/helper.rb", "lib/oauth/client/net_http.rb", "lib/oauth/consumer.rb", "lib/oauth/helper.rb", "lib/oauth/oauth_test_helper.rb", "lib/oauth/request_proxy.rb", "lib/oauth/request_proxy/action_controller_request.rb", "lib/oauth/request_proxy/base.rb", "lib/oauth/request_proxy/jabber_request.rb", "lib/oauth/request_proxy/mock_request.rb", "lib/oauth/request_proxy/net_http.rb", "lib/oauth/request_proxy/rack_request.rb", "lib/oauth/server.rb", "lib/oauth/signature.rb", "lib/oauth/signature/base.rb", "lib/oauth/signature/hmac/base.rb", "lib/oauth/signature/hmac/md5.rb", "lib/oauth/signature/hmac/rmd160.rb", "lib/oauth/signature/hmac/sha1.rb", "lib/oauth/signature/hmac/sha2.rb", "lib/oauth/signature/md5.rb", "lib/oauth/signature/plaintext.rb", "lib/oauth/signature/rsa/sha1.rb", "lib/oauth/signature/sha1.rb", "lib/oauth/token.rb", "lib/oauth/version.rb", "oauth.gemspec", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "specs.txt", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/cases/oauth_case.rb", "test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/keys/rsa.cert", "test/keys/rsa.pem", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.rhtml"]
14
+ s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "website/index.txt"]
15
+ s.files = ["History.txt", "License.txt", "Manifest.txt", "README.rdoc", "Rakefile", "TODO", "bin/oauth", "examples/yql.rb", "lib/oauth.rb", "lib/oauth/oauth.rb", "lib/oauth/cli.rb", "lib/oauth/client.rb", "lib/oauth/client/action_controller_request.rb", "lib/oauth/client/helper.rb", "lib/oauth/client/net_http.rb", "lib/oauth/consumer.rb", "lib/oauth/errors.rb", "lib/oauth/errors/error.rb", "lib/oauth/errors/problem.rb", "lib/oauth/errors/unauthorized.rb", "lib/oauth/helper.rb", "lib/oauth/oauth_test_helper.rb", "lib/oauth/request_proxy.rb", "lib/oauth/request_proxy/action_controller_request.rb", "lib/oauth/request_proxy/base.rb", "lib/oauth/request_proxy/jabber_request.rb", "lib/oauth/request_proxy/mock_request.rb", "lib/oauth/request_proxy/net_http.rb", "lib/oauth/request_proxy/rack_request.rb", "lib/oauth/server.rb", "lib/oauth/signature.rb", "lib/oauth/signature/base.rb", "lib/oauth/signature/hmac/base.rb", "lib/oauth/signature/hmac/md5.rb", "lib/oauth/signature/hmac/rmd160.rb", "lib/oauth/signature/hmac/sha1.rb", "lib/oauth/signature/hmac/sha2.rb", "lib/oauth/signature/md5.rb", "lib/oauth/signature/plaintext.rb", "lib/oauth/signature/rsa/sha1.rb", "lib/oauth/signature/sha1.rb", "lib/oauth/token.rb", "lib/oauth/tokens/access_token.rb", "lib/oauth/tokens/consumer_token.rb", "lib/oauth/tokens/request_token.rb", "lib/oauth/tokens/server_token.rb", "lib/oauth/tokens/token.rb", "lib/oauth/version.rb", "oauth.gemspec", "script/destroy", "script/generate", "script/txt2html", "setup.rb", "tasks/deployment.rake", "tasks/environment.rake", "tasks/website.rake", "test/cases/oauth_case.rb", "test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/keys/rsa.cert", "test/keys/rsa.pem", "test/test_access_token.rb", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_request_token.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.rb", "website/index.html", "website/index.txt", "website/javascripts/rounded_corners_lite.inc.js", "website/stylesheets/screen.css", "website/template.rhtml"]
16
16
  s.has_rdoc = true
17
17
  s.homepage = %q{http://oauth.rubyforge.org}
18
18
  s.rdoc_options = ["--main", "README.rdoc"]
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.rubyforge_project = %q{oauth}
21
21
  s.rubygems_version = %q{1.3.1}
22
22
  s.summary = %q{OAuth Core Ruby implementation}
23
- s.test_files = ["test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.rb"]
23
+ s.test_files = ["test/cases/spec/1_0-final/test_construct_request_url.rb", "test/cases/spec/1_0-final/test_normalize_request_parameters.rb", "test/cases/spec/1_0-final/test_parameter_encodings.rb", "test/cases/spec/1_0-final/test_signature_base_strings.rb", "test/test_access_token.rb", "test/test_action_controller_request_proxy.rb", "test/test_consumer.rb", "test/test_helper.rb", "test/test_hmac_sha1.rb", "test/test_net_http_client.rb", "test/test_net_http_request_proxy.rb", "test/test_rack_request_proxy.rb", "test/test_request_token.rb", "test/test_rsa_sha1.rb", "test/test_server.rb", "test/test_signature.rb", "test/test_signature_base.rb", "test/test_signature_plain_text.rb", "test/test_token.rb"]
24
24
 
25
25
  if s.respond_to? :specification_version then
26
26
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
@@ -29,15 +29,21 @@ Gem::Specification.new do |s|
29
29
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
30
30
  s.add_runtime_dependency(%q<ruby-hmac>, [">= 0.3.1"])
31
31
  s.add_development_dependency(%q<newgem>, [">= 1.2.3"])
32
+ s.add_development_dependency(%q<actionpack>, [">= 0"])
33
+ s.add_development_dependency(%q<rack>, [">= 0"])
32
34
  s.add_development_dependency(%q<hoe>, [">= 1.8.0"])
33
35
  else
34
36
  s.add_dependency(%q<ruby-hmac>, [">= 0.3.1"])
35
37
  s.add_dependency(%q<newgem>, [">= 1.2.3"])
38
+ s.add_dependency(%q<actionpack>, [">= 0"])
39
+ s.add_dependency(%q<rack>, [">= 0"])
36
40
  s.add_dependency(%q<hoe>, [">= 1.8.0"])
37
41
  end
38
42
  else
39
43
  s.add_dependency(%q<ruby-hmac>, [">= 0.3.1"])
40
44
  s.add_dependency(%q<newgem>, [">= 1.2.3"])
45
+ s.add_dependency(%q<actionpack>, [">= 0"])
46
+ s.add_dependency(%q<rack>, [">= 0"])
41
47
  s.add_dependency(%q<hoe>, [">= 1.8.0"])
42
48
  end
43
49
  end
@@ -40,7 +40,7 @@ class ConstructRequestUrlTest < OAuthCase
40
40
  assert_request_url("https://example.com/resource","HTTPS://Example.com:443/resource?id=123")
41
41
  end
42
42
 
43
- def test_of_normalized_http
43
+ def test_of_normalized_https
44
44
  assert_request_url("https://example.com/resource","https://example.com/resource")
45
45
  end
46
46
 
@@ -0,0 +1,28 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+ require 'oauth/token'
3
+ require 'oauth/consumer'
4
+
5
+ class TestAccessToken < Test::Unit::TestCase
6
+ def setup
7
+ @fake_response = {
8
+ :user_id => 5734758743895,
9
+ :oauth_token => "key",
10
+ :oauth_token_secret => "secret"
11
+ }
12
+ # setup a fake req. token. mocking Consumer would be more appropriate...
13
+ @access_token = OAuth::AccessToken.from_hash(
14
+ OAuth::Consumer.new("key", "secret", {}),
15
+ @fake_response
16
+ )
17
+ end
18
+
19
+ def test_provides_response_parameters
20
+ assert @access_token
21
+ assert_respond_to @access_token, :params
22
+ end
23
+
24
+ def test_access_token_makes_non_oauth_response_params_available
25
+ assert_not_nil @access_token.params[:user_id]
26
+ assert_equal 5734758743895, @access_token.params[:user_id]
27
+ end
28
+ end
@@ -18,6 +18,13 @@ class ActionControllerRequestProxyTest < Test::Unit::TestCase
18
18
  request_proxy({ :message => { :body => 'This is a test' }}).parameters_for_signature
19
19
  )
20
20
  end
21
+
22
+ def test_parameter_values_with_amps_should_not_break_parameter_parsing
23
+ assert_equal(
24
+ [['message[body]', 'http://foo.com/?a=b&c=d']],
25
+ request_proxy({ :message => { :body => 'http://foo.com/?a=b&c=d'}}).parameters_for_signature
26
+ )
27
+ end
21
28
 
22
29
  def test_parameter_keys_should_preserve_brackets_from_array
23
30
  assert_equal(
@@ -25,4 +32,14 @@ class ActionControllerRequestProxyTest < Test::Unit::TestCase
25
32
  request_proxy({ :foo => [123, 456] }).parameters_for_signature.sort
26
33
  )
27
34
  end
35
+
36
+ def test_query_string_parameter_values_should_be_cgi_unescaped
37
+ request = request_proxy do |r|
38
+ r.env['QUERY_STRING'] = 'url=http%3A%2F%2Ffoo.com%2F%3Fa%3Db%26c%3Dd'
39
+ end
40
+ assert_equal(
41
+ [['url', 'http://foo.com/?a=b&c=d']],
42
+ request.parameters_for_signature.sort
43
+ )
44
+ end
28
45
  end
@@ -1,5 +1,4 @@
1
- require 'rubygems'
2
- require 'test/unit'
1
+ require File.dirname(__FILE__) + '/test_helper'
3
2
  require 'oauth/consumer'
4
3
  require 'oauth/signature/rsa/sha1'
5
4
 
@@ -144,7 +143,7 @@ class ConsumerTest < Test::Unit::TestCase
144
143
 
145
144
  assert_equal 'POST', request.method
146
145
  assert_equal '/test', request.path
147
- assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=iMZaUTbQof%2fHMFyIde%2bOIkhW5is%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&")
146
+ assert_equal "key=value&oauth_consumer_key=consumer_key_86cad9&oauth_nonce=225579211881198842005988698334675835446&oauth_signature=26g7wHTtNO6ZWJaLltcueppHYiI%3d&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1199645624&oauth_token=token_411a7f&oauth_version=1.0", request.body.split("&").sort.join("&")
148
147
  assert_equal nil, request['authorization']
149
148
  end
150
149
 
@@ -164,7 +163,7 @@ class ConsumerTest < Test::Unit::TestCase
164
163
  assert_equal "OAuth oauth_nonce=\"225579211881198842005988698334675835446\", oauth_signature_method=\"HMAC-SHA1\", oauth_token=\"token_411a7f\", oauth_timestamp=\"1199645624\", oauth_consumer_key=\"consumer_key_86cad9\", oauth_signature=\"26g7wHTtNO6ZWJaLltcueppHYiI%3D\", oauth_version=\"1.0\"".split(', ').sort, request['authorization'].split(', ').sort
165
164
  end
166
165
 
167
- def test_that_signing_post_params_works
166
+ def test_that_signing_post_params_works_2
168
167
  request=@consumer.create_signed_request(:post,@request_uri.path,@token,{:scheme => 'body', :nonce => @nonce, :timestamp => @timestamp},@request_parameters,{})
169
168
 
170
169
  assert_equal 'POST', request.method
@@ -8,8 +8,3 @@ begin
8
8
  rescue LoadError
9
9
  nil
10
10
  end
11
-
12
- def requests(request)
13
- Marshal.load(File.read(File.dirname(__FILE__) + '/fixtures/' + request))
14
- end
15
-
@@ -0,0 +1,53 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+ require 'oauth/token'
3
+ require 'oauth/consumer'
4
+
5
+ class StubbedToken < OAuth::RequestToken
6
+ define_method :build_authorize_url_promoted do |root_domain, params|
7
+ build_authorize_url root_domain, params
8
+ end
9
+ end
10
+
11
+ class TestRequestToken < Test::Unit::TestCase
12
+ def setup
13
+ # setup a fake req. token. mocking Consumer would be more appropriate...
14
+ @request_token = OAuth::RequestToken.new(
15
+ OAuth::Consumer.new("key", "secret", {}),
16
+ "key",
17
+ "secret"
18
+ )
19
+ end
20
+
21
+ def test_request_token_builds_authorize_url_connectly_with_additional_params
22
+ auth_url = @request_token.authorize_url({:oauth_callback => "github.com"})
23
+ assert_not_nil auth_url
24
+ assert_match(/oauth_token/, auth_url)
25
+ assert_match(/oauth_callback/, auth_url)
26
+ end
27
+
28
+ def test_request_token_builds_authorize_url_connectly_with_no_or_nil_params
29
+ # we should only have 1 key in the url returned if we didn't pass anything.
30
+ # this is the only required param to authenticate the client.
31
+ auth_url = @request_token.authorize_url(nil)
32
+ assert_not_nil auth_url
33
+ assert_match(/\?oauth_token=/, auth_url)
34
+
35
+ auth_url = @request_token.authorize_url
36
+ assert_not_nil auth_url
37
+ assert_match(/\?oauth_token=/, auth_url)
38
+ end
39
+
40
+ #TODO: mock out the Consumer to test the Consumer/AccessToken interaction.
41
+ def test_get_access_token
42
+ end
43
+
44
+ def test_build_authorize_url
45
+ @stubbed_token = StubbedToken.new(nil, nil, nil)
46
+ assert_respond_to @stubbed_token, :build_authorize_url_promoted
47
+ url = @stubbed_token.build_authorize_url_promoted(
48
+ "http://github.com/oauth/authorize",
49
+ {:foo => "bar bar"})
50
+ assert url
51
+ assert_equal "http://github.com/oauth/authorize?foo=bar+bar", url
52
+ end
53
+ end
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require File.dirname(__FILE__) + '/test_helper'
2
2
  require 'oauth/server'
3
3
  class ServerTest < Test::Unit::TestCase
4
4
  def setup
@@ -33,7 +33,7 @@
33
33
  <h1>Ruby OAuth GEM</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/oauth"; return false'>
35
35
  <p>Get Version</p>
36
- <a href="http://rubyforge.org/projects/oauth" class="numbers">0.3.0</a>
36
+ <a href="http://rubyforge.org/projects/oauth" class="numbers">0.3.2</a>
37
37
  </div>
38
38
  <h2>What</h2>
39
39
  <p>This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.</p>
@@ -41,7 +41,7 @@
41
41
  <h2>Installing</h2>
42
42
  <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">oauth</span></pre></p>
43
43
  <p>You can also install it from the <a href="http://rubyforge.org/projects/oauth/">oauth rubyforge project</a>.</p>
44
- <p>The source code is now hosted on the <a href="http://github.com/pelle/oauth/tree/master">OAuth GitHub Project</a></p>
44
+ <p>The source code is now hosted on the <a href="http://github.com/mojodna/oauth">OAuth GitHub Project</a></p>
45
45
  <h2>The basics</h2>
46
46
  <p>This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is <span class="caps">NOT</span> a Rails plugin, but could easily be used for the foundation for such a Rails plugin.</p>
47
47
  <p>As a matter of fact it has been pulled out from an <a href="http://code.google.com/p/oauth-plugin/">OAuth Rails Plugin</a> which now requires this <span class="caps">GEM</span>.</p>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pelle Braendgaard
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2009-01-26 00:00:00 -08:00
17
+ date: 2009-03-23 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -37,6 +37,26 @@ dependencies:
37
37
  - !ruby/object:Gem::Version
38
38
  version: 1.2.3
39
39
  version:
40
+ - !ruby/object:Gem::Dependency
41
+ name: actionpack
42
+ type: :development
43
+ version_requirement:
44
+ version_requirements: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
50
+ - !ruby/object:Gem::Dependency
51
+ name: rack
52
+ type: :development
53
+ version_requirement:
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: "0"
59
+ version:
40
60
  - !ruby/object:Gem::Dependency
41
61
  name: hoe
42
62
  type: :development
@@ -58,7 +78,6 @@ extra_rdoc_files:
58
78
  - License.txt
59
79
  - Manifest.txt
60
80
  - README.rdoc
61
- - specs.txt
62
81
  - website/index.txt
63
82
  files:
64
83
  - History.txt
@@ -68,13 +87,19 @@ files:
68
87
  - Rakefile
69
88
  - TODO
70
89
  - bin/oauth
90
+ - examples/yql.rb
71
91
  - lib/oauth.rb
92
+ - lib/oauth/oauth.rb
72
93
  - lib/oauth/cli.rb
73
94
  - lib/oauth/client.rb
74
95
  - lib/oauth/client/action_controller_request.rb
75
96
  - lib/oauth/client/helper.rb
76
97
  - lib/oauth/client/net_http.rb
77
98
  - lib/oauth/consumer.rb
99
+ - lib/oauth/errors.rb
100
+ - lib/oauth/errors/error.rb
101
+ - lib/oauth/errors/problem.rb
102
+ - lib/oauth/errors/unauthorized.rb
78
103
  - lib/oauth/helper.rb
79
104
  - lib/oauth/oauth_test_helper.rb
80
105
  - lib/oauth/request_proxy.rb
@@ -97,13 +122,17 @@ files:
97
122
  - lib/oauth/signature/rsa/sha1.rb
98
123
  - lib/oauth/signature/sha1.rb
99
124
  - lib/oauth/token.rb
125
+ - lib/oauth/tokens/access_token.rb
126
+ - lib/oauth/tokens/consumer_token.rb
127
+ - lib/oauth/tokens/request_token.rb
128
+ - lib/oauth/tokens/server_token.rb
129
+ - lib/oauth/tokens/token.rb
100
130
  - lib/oauth/version.rb
101
131
  - oauth.gemspec
102
132
  - script/destroy
103
133
  - script/generate
104
134
  - script/txt2html
105
135
  - setup.rb
106
- - specs.txt
107
136
  - tasks/deployment.rake
108
137
  - tasks/environment.rake
109
138
  - tasks/website.rake
@@ -114,6 +143,7 @@ files:
114
143
  - test/cases/spec/1_0-final/test_signature_base_strings.rb
115
144
  - test/keys/rsa.cert
116
145
  - test/keys/rsa.pem
146
+ - test/test_access_token.rb
117
147
  - test/test_action_controller_request_proxy.rb
118
148
  - test/test_consumer.rb
119
149
  - test/test_helper.rb
@@ -121,6 +151,7 @@ files:
121
151
  - test/test_net_http_client.rb
122
152
  - test/test_net_http_request_proxy.rb
123
153
  - test/test_rack_request_proxy.rb
154
+ - test/test_request_token.rb
124
155
  - test/test_rsa_sha1.rb
125
156
  - test/test_server.rb
126
157
  - test/test_signature.rb
@@ -164,6 +195,7 @@ test_files:
164
195
  - test/cases/spec/1_0-final/test_normalize_request_parameters.rb
165
196
  - test/cases/spec/1_0-final/test_parameter_encodings.rb
166
197
  - test/cases/spec/1_0-final/test_signature_base_strings.rb
198
+ - test/test_access_token.rb
167
199
  - test/test_action_controller_request_proxy.rb
168
200
  - test/test_consumer.rb
169
201
  - test/test_helper.rb
@@ -171,6 +203,7 @@ test_files:
171
203
  - test/test_net_http_client.rb
172
204
  - test/test_net_http_request_proxy.rb
173
205
  - test/test_rack_request_proxy.rb
206
+ - test/test_request_token.rb
174
207
  - test/test_rsa_sha1.rb
175
208
  - test/test_server.rb
176
209
  - test/test_signature.rb