oauth-plugin 0.4.0.pre4 → 0.4.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. data/.gitignore +2 -0
  2. data/CHANGELOG +11 -0
  3. data/Gemfile.lock +66 -0
  4. data/Guardfile +8 -0
  5. data/README.rdoc +50 -4
  6. data/generators/oauth_consumer/templates/controller.rb +8 -0
  7. data/generators/oauth_consumer/templates/oauth_config.rb +23 -1
  8. data/generators/oauth_provider/oauth_provider_generator.rb +0 -4
  9. data/generators/oauth_provider/templates/oauth2_authorize.html.erb +2 -2
  10. data/generators/oauth_provider/templates/oauth2_authorize.html.haml +1 -1
  11. data/generators/oauth_provider/templates/request_token.rb +2 -2
  12. data/lib/generators/active_record/oauth_provider_templates/request_token.rb +2 -2
  13. data/lib/generators/erb/oauth_provider_templates/oauth2_authorize.html.erb +1 -1
  14. data/lib/generators/haml/oauth_provider_templates/oauth2_authorize.html.haml +1 -1
  15. data/lib/generators/mongoid/oauth_consumer_templates/consumer_token.rb +10 -8
  16. data/lib/generators/mongoid/oauth_provider_templates/request_token.rb +2 -2
  17. data/lib/generators/oauth_consumer/oauth_consumer_generator.rb +5 -1
  18. data/lib/generators/oauth_consumer/templates/controller.rb +9 -0
  19. data/lib/generators/oauth_consumer/templates/oauth_config.rb +21 -0
  20. data/lib/generators/rspec/oauth_provider_generator.rb +0 -4
  21. data/lib/generators/test_unit/oauth_provider_generator.rb +0 -4
  22. data/lib/oauth-plugin/version.rb +1 -1
  23. data/lib/oauth/controllers/application_controller_methods.rb +24 -127
  24. data/lib/oauth/controllers/consumer_controller.rb +60 -8
  25. data/lib/oauth/controllers/provider_controller.rb +4 -7
  26. data/lib/oauth/models/consumers/service_loader.rb +3 -1
  27. data/lib/oauth/models/consumers/services/google_token.rb +7 -13
  28. data/lib/oauth/models/consumers/services/oauth2_token.rb +27 -0
  29. data/lib/oauth/models/consumers/services/twitter_token.rb +18 -11
  30. data/lib/oauth/models/consumers/token.rb +10 -6
  31. data/lib/oauth/rack/oauth_filter.rb +57 -12
  32. data/oauth-plugin.gemspec +11 -3
  33. data/spec/rack/oauth_filter_spec.rb +136 -0
  34. data/spec/spec_helper.rb +3 -0
  35. metadata +105 -38
  36. data/generators/oauth_provider/templates/controller_spec.rb +0 -838
  37. data/generators/oauth_provider/templates/controller_spec_helper.rb +0 -66
  38. data/generators/oauth_provider/templates/controller_test.rb +0 -310
  39. data/generators/oauth_provider/templates/controller_test_helper.rb +0 -115
  40. data/lib/generators/rspec/templates/controller_spec.rb +0 -838
  41. data/lib/generators/rspec/templates/controller_spec_helper.rb +0 -66
  42. data/lib/generators/test_unit/templates/controller_test.rb +0 -310
  43. data/lib/generators/test_unit/templates/controller_test_helper.rb +0 -115
@@ -1,17 +1,24 @@
1
- require 'twitter'
2
1
  class TwitterToken < ConsumerToken
3
- TWITTER_SETTINGS={:site=>"http://twitter.com"}
4
- def self.consumer
5
- @consumer||=OAuth::Consumer.new credentials[:key],credentials[:secret],TWITTER_SETTINGS
2
+ TWITTER_SETTINGS={
3
+ :site => "https://api.twitter.com",
4
+ :request_token_path => "/oauth/request_token",
5
+ :authorize_path => "/oauth/authorize",
6
+ :access_token_path => "/oauth/access_token",
7
+ }
8
+
9
+ def self.consumer(options={})
10
+ @consumer ||= OAuth::Consumer.new(credentials[:key], credentials[:secret], TWITTER_SETTINGS.merge(options))
6
11
  end
7
12
 
8
13
  def client
9
- unless @client
10
- @twitter_oauth=Twitter::OAuth.new TwitterToken.consumer.key,TwitterToken.consumer.secret
11
- @twitter_oauth.authorize_from_access token,secret
12
- @client=Twitter::Base.new(@twitter_oauth)
14
+ @client ||= begin
15
+ if credentials[:client].to_sym==:oauth_gem
16
+ super
17
+ else
18
+ require 'twitter'
19
+ Twitter::Client.new(:consumer_key => TwitterToken.consumer.key, :consumer_secret => TwitterToken.consumer.secret)
20
+ end
13
21
  end
14
-
15
- @client
16
22
  end
17
- end
23
+
24
+ end
@@ -7,7 +7,7 @@ module Oauth
7
7
  module Token
8
8
  def self.included(model)
9
9
  model.class_eval do
10
- validates_presence_of :user, :token, :secret
10
+ validates_presence_of :user, :token
11
11
  end
12
12
 
13
13
  model.send(:include, InstanceMethods)
@@ -26,7 +26,6 @@ module Oauth
26
26
  end
27
27
 
28
28
  def get_request_token(callback_url)
29
- Rails.logger.info "OAUTH_CONSUMER #{consumer.inspect}"
30
29
  consumer.get_request_token(:oauth_callback=>callback_url)
31
30
  end
32
31
 
@@ -39,13 +38,18 @@ module Oauth
39
38
  end
40
39
 
41
40
  def find_or_create_from_access_token(user,access_token)
41
+ secret = access_token.respond_to?(:secret) ? access_token.secret : nil
42
42
  if user
43
- user.consumer_tokens.first(:conditions=>{:type=>self.to_s,:token=>access_token.token}) ||
44
- user.consumer_tokens.create!(:type=>self.to_s,:token=>access_token.token, :secret=>access_token.secret)
43
+ token = self.find_or_initialize_by_user_id_and_token(user.id, access_token.token)
45
44
  else
46
- ConsumerToken.first( :conditions =>{ :token=>access_token.token,:type=>self.to_s}) ||
47
- create(:type=>self.to_s,:token=>access_token.token, :secret=>access_token.secret)
45
+ token = self.find_or_initialize_by_token(access_token.token)
48
46
  end
47
+
48
+ # set or update the secret
49
+ token.secret = secret
50
+ token.save! if token.new_record? or token.changed?
51
+
52
+ token
49
53
  end
50
54
 
51
55
  def build_user_from_token
@@ -1,6 +1,8 @@
1
1
  require "rack"
2
2
  require "rack/request"
3
- require "oauth/signature"
3
+ require "oauth"
4
+ require "oauth/request_proxy/rack_request"
5
+
4
6
  module OAuth
5
7
  module Rack
6
8
 
@@ -22,29 +24,72 @@ module OAuth
22
24
  def call(env)
23
25
  request = ::Rack::Request.new(env)
24
26
  env["oauth_plugin"]=true
25
- if ClientApplication.verify_request(request) do |request_proxy|
27
+ strategies = []
28
+ if token_string = oauth2_token(request)
29
+ token = Oauth2Token.find_by_token(token_string) if token_string
30
+ if token
31
+ env["oauth.token"] = token
32
+ env["oauth.version"] = 2
33
+ strategies << :oauth20_token
34
+ strategies << :token
35
+ end
36
+
37
+ elsif oauth1_verify(request) do |request_proxy|
26
38
  client_application = ClientApplication.find_by_key(request_proxy.consumer_key)
27
39
  env["oauth.client_application_candidate"] = client_application
28
- # Store this temporarily in client_application object for use in request token generation
40
+ # Store this temporarily in client_application object for use in request token generation
29
41
  client_application.token_callback_url=request_proxy.oauth_callback if request_proxy.oauth_callback
42
+
43
+ oauth_token = nil
30
44
 
31
- oauth_token = client_application.tokens.first(:conditions=>{:token => request_proxy.token})
32
- if oauth_token.respond_to?(:provided_oauth_verifier=)
33
- oauth_token.provided_oauth_verifier=request_proxy.oauth_verifier
45
+ if request_proxy.token
46
+ oauth_token = client_application.tokens.first(:conditions=>{:token => request_proxy.token})
47
+ if oauth_token.respond_to?(:provided_oauth_verifier=)
48
+ oauth_token.provided_oauth_verifier=request_proxy.oauth_verifier
49
+ end
50
+ env["oauth.token_candidate"] = oauth_token
34
51
  end
35
- env["oauth.token_candidate"] = oauth_token
36
52
  # return the token secret and the consumer secret
37
53
  [(oauth_token.nil? ? nil : oauth_token.secret), (client_application.nil? ? nil : client_application.secret)]
54
+ end
55
+ if env["oauth.token_candidate"]
56
+ env["oauth.token"] = env["oauth.token_candidate"]
57
+ strategies << :oauth10_token
58
+ if env["oauth.token"].is_a?(::RequestToken)
59
+ strategies << :oauth10_request_token
60
+ elsif env["oauth.token"].is_a?(::AccessToken)
61
+ strategies << :token
62
+ strategies << :oauth10_access_token
63
+ end
64
+ else
65
+ strategies << :two_legged
38
66
  end
39
- env["oauth.token"] = env["oauth.token_candidate"]
40
67
  env["oauth.client_application"] = env["oauth.client_application_candidate"]
41
- # Rails.logger.info "oauth.token = #{env["oauth.token"].inspect}"
68
+ env["oauth.version"] = 1
69
+
42
70
  end
71
+ env["oauth.strategies"] = strategies unless strategies.empty?
43
72
  env["oauth.client_application_candidate"] = nil
44
73
  env["oauth.token_candidate"] = nil
45
- response = @app.call(env)
74
+ @app.call(env)
46
75
  end
47
- end
48
-
76
+
77
+ def oauth1_verify(request, options = {}, &block)
78
+ begin
79
+ signature = OAuth::Signature.build(request, options, &block)
80
+ return false unless OauthNonce.remember(signature.request.nonce, signature.request.timestamp)
81
+ value = signature.verify
82
+ value
83
+ rescue OAuth::Signature::UnknownSignatureMethod => e
84
+ false
85
+ end
86
+ end
87
+
88
+ def oauth2_token(request)
89
+ request.params["oauth_token"] ||
90
+ request.env["HTTP_AUTHORIZATION"] &&
91
+ request.env["HTTP_AUTHORIZATION"][/^(OAuth|Token) ([^\s]*)$/] && $2
92
+ end
93
+ end
49
94
  end
50
95
  end
data/oauth-plugin.gemspec CHANGED
@@ -23,9 +23,17 @@ Gem::Specification.new do |s|
23
23
  s.rubyforge_project = %q{oauth}
24
24
  s.rubygems_version = %q{1.3.7}
25
25
  s.summary = %q{Ruby on Rails Plugin for OAuth Provider and Consumer}
26
- s.add_development_dependency "twitter"
27
26
  s.add_development_dependency "opentransact"
28
-
29
- s.add_dependency(%q<oauth>, [">= 0.4.4"])
27
+ s.add_development_dependency "rspec", "~> 2.4.0"
28
+ s.add_development_dependency "fakeweb"
29
+ s.add_development_dependency "fuubar"
30
+ s.add_development_dependency "guard-rspec"
31
+ s.add_development_dependency "growl"
32
+ s.add_development_dependency "rack-test"
33
+
34
+ s.add_dependency "multi_json"
35
+ s.add_dependency("oauth", ["~> 0.4.4"])
36
+ s.add_dependency("rack")
37
+ s.add_dependency("oauth2")
30
38
  end
31
39
 
@@ -0,0 +1,136 @@
1
+ require 'spec_helper'
2
+ require 'rack/test'
3
+ require 'oauth/rack/oauth_filter'
4
+ require 'multi_json'
5
+ require 'forwardable'
6
+ class OAuthEcho
7
+ def call(env)
8
+ response = {}
9
+ response[:oauth_token] = env["oauth.token"].token if env["oauth.token"]
10
+ response[:client_application] = env["oauth.client_application"].key if env["oauth.client_application"]
11
+ response[:oauth_version] = env["oauth.version"] if env["oauth.version"]
12
+ response[:strategies] = env["oauth.strategies"] if env["oauth.strategies"]
13
+ [200 ,{"Accept"=>"application/json"}, [MultiJson.encode(response)] ]
14
+ end
15
+ end
16
+
17
+ describe OAuth::Rack::OAuthFilter do
18
+ include Rack::Test::Methods
19
+
20
+ def app
21
+ @app ||= OAuth::Rack::OAuthFilter.new(OAuthEcho.new)
22
+ end
23
+
24
+ it "should pass through without oauth" do
25
+ get '/'
26
+ last_response.should be_ok
27
+ response = MultiJson.decode(last_response.body)
28
+ response.should == {}
29
+ end
30
+
31
+ it "should sign with consumer" do
32
+ get '/',{},{"HTTP_AUTHORIZATION"=>'OAuth oauth_consumer_key="my_consumer", oauth_nonce="amrLDyFE2AMztx5fOYDD1OEqWps6Mc2mAR5qyO44Rj8", oauth_signature="KCSg0RUfVFUcyhrgJo580H8ey0c%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1295039581", oauth_version="1.0"'}
33
+ last_response.should be_ok
34
+ response = MultiJson.decode(last_response.body)
35
+ response.should == {"client_application" => "my_consumer", "oauth_version"=>1, "strategies"=>["two_legged"]}
36
+ end
37
+
38
+ it "should sign with oauth 1 access token" do
39
+ client_application = ClientApplication.new "my_consumer"
40
+ ClientApplication.stub!(:find_by_key).and_return(client_application)
41
+ client_application.tokens.stub!(:first).and_return(AccessToken.new("my_token"))
42
+ get '/',{},{"HTTP_AUTHORIZATION"=>'OAuth oauth_consumer_key="my_consumer", oauth_nonce="oiFHXoN0172eigBBUfgaZLdQg7ycGekv8iTdfkCStY", oauth_signature="y35B2DqTWaNlzNX0p4wv%2FJAGzg8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1295040394", oauth_token="my_token", oauth_version="1.0"'}
43
+ last_response.should be_ok
44
+ response = MultiJson.decode(last_response.body)
45
+ response.should == {"client_application" => "my_consumer", "oauth_token"=>"my_token","oauth_version"=>1, "strategies"=>["oauth10_token","token","oauth10_access_token"]}
46
+ end
47
+
48
+ it "should sign with oauth 1 request token" do
49
+ client_application = ClientApplication.new "my_consumer"
50
+ ClientApplication.stub!(:find_by_key).and_return(client_application)
51
+ client_application.tokens.stub!(:first).and_return(RequestToken.new("my_token"))
52
+ get '/',{},{"HTTP_AUTHORIZATION"=>'OAuth oauth_consumer_key="my_consumer", oauth_nonce="oiFHXoN0172eigBBUfgaZLdQg7ycGekv8iTdfkCStY", oauth_signature="y35B2DqTWaNlzNX0p4wv%2FJAGzg8%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1295040394", oauth_token="my_token", oauth_version="1.0"'}
53
+ last_response.should be_ok
54
+ response = MultiJson.decode(last_response.body)
55
+ response.should == {"client_application" => "my_consumer", "oauth_token"=>"my_token","oauth_version"=>1, "strategies"=>["oauth10_token","oauth10_request_token"]}
56
+ end
57
+
58
+ it "should authenticate with oauth2 auth header" do
59
+ get '/',{},{"HTTP_AUTHORIZATION"=>"OAuth my_token"}
60
+ last_response.should be_ok
61
+ response = MultiJson.decode(last_response.body)
62
+ response.should == {"oauth_token" => "my_token", "oauth_version"=>2, "strategies"=>["oauth20_token","token"]}
63
+ end
64
+
65
+ it "should authenticate with pre draft 10 oauth2 auth header" do
66
+ get '/',{},{"HTTP_AUTHORIZATION"=>"Token my_token"}
67
+ last_response.should be_ok
68
+ response = MultiJson.decode(last_response.body)
69
+ response.should == {"oauth_token" => "my_token", "oauth_version"=>2, "strategies"=>["oauth20_token","token"]}
70
+ end
71
+
72
+ it "should authenticate with oauth2 query parameter" do
73
+ get '/?oauth_token=my_token'
74
+ last_response.should be_ok
75
+ response = MultiJson.decode(last_response.body)
76
+ response.should == {"oauth_token" => "my_token", "oauth_version"=>2, "strategies"=>["oauth20_token","token"]}
77
+ end
78
+
79
+ it "should authenticate with oauth2 post parameter" do
80
+ post '/', :oauth_token=>'my_token'
81
+ last_response.should be_ok
82
+ response = MultiJson.decode(last_response.body)
83
+ response.should == {"oauth_token" => "my_token", "oauth_version"=>2, "strategies"=>["oauth20_token","token"]}
84
+ end
85
+
86
+
87
+ # Dummy implementation
88
+ class ClientApplication
89
+ attr_accessor :key
90
+
91
+ def self.find_by_key(key)
92
+ ClientApplication.new(key)
93
+ end
94
+
95
+ def initialize(key)
96
+ @key = key
97
+ end
98
+
99
+ def tokens
100
+ @tokens||=[]
101
+ end
102
+
103
+ def secret
104
+ "secret"
105
+ end
106
+ end
107
+
108
+ class OauthToken
109
+ attr_accessor :token
110
+
111
+ def self.find_by_token(token)
112
+ OauthToken.new(token)
113
+ end
114
+
115
+ def initialize(token)
116
+ @token = token
117
+ end
118
+
119
+ def secret
120
+ "secret"
121
+ end
122
+ end
123
+
124
+ class Oauth2Token < OauthToken ; end
125
+ class AccessToken < OauthToken ; end
126
+ class RequestToken < OauthToken ; end
127
+
128
+ class OauthNonce
129
+ # Always remember
130
+ def self.remember(nonce,timestamp)
131
+ true
132
+ end
133
+ end
134
+
135
+
136
+ end
@@ -0,0 +1,3 @@
1
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
2
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
+ require 'rspec'
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth-plugin
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
5
- segments:
6
- - 0
7
- - 4
8
- - 0
9
- - pre4
10
- version: 0.4.0.pre4
4
+ prerelease: 6
5
+ version: 0.4.0.pre5
11
6
  platform: ruby
12
7
  authors:
13
8
  - Pelle Braendgaard
@@ -19,46 +14,126 @@ date: 2010-12-08 00:00:00 -05:00
19
14
  default_executable:
20
15
  dependencies:
21
16
  - !ruby/object:Gem::Dependency
22
- name: twitter
17
+ name: opentransact
23
18
  prerelease: false
24
19
  requirement: &id001 !ruby/object:Gem::Requirement
25
20
  none: false
26
21
  requirements:
27
22
  - - ">="
28
23
  - !ruby/object:Gem::Version
29
- segments:
30
- - 0
31
24
  version: "0"
32
25
  type: :development
33
26
  version_requirements: *id001
34
27
  - !ruby/object:Gem::Dependency
35
- name: opentransact
28
+ name: rspec
36
29
  prerelease: false
37
30
  requirement: &id002 !ruby/object:Gem::Requirement
38
31
  none: false
39
32
  requirements:
40
- - - ">="
33
+ - - ~>
41
34
  - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- version: "0"
35
+ version: 2.4.0
45
36
  type: :development
46
37
  version_requirements: *id002
47
38
  - !ruby/object:Gem::Dependency
48
- name: oauth
39
+ name: fakeweb
49
40
  prerelease: false
50
41
  requirement: &id003 !ruby/object:Gem::Requirement
51
42
  none: false
52
43
  requirements:
53
44
  - - ">="
54
45
  - !ruby/object:Gem::Version
55
- segments:
56
- - 0
57
- - 4
58
- - 4
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id003
49
+ - !ruby/object:Gem::Dependency
50
+ name: fuubar
51
+ prerelease: false
52
+ requirement: &id004 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ version: "0"
58
+ type: :development
59
+ version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: guard-rspec
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ type: :development
70
+ version_requirements: *id005
71
+ - !ruby/object:Gem::Dependency
72
+ name: growl
73
+ prerelease: false
74
+ requirement: &id006 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ type: :development
81
+ version_requirements: *id006
82
+ - !ruby/object:Gem::Dependency
83
+ name: rack-test
84
+ prerelease: false
85
+ requirement: &id007 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: "0"
91
+ type: :development
92
+ version_requirements: *id007
93
+ - !ruby/object:Gem::Dependency
94
+ name: multi_json
95
+ prerelease: false
96
+ requirement: &id008 !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: "0"
102
+ type: :runtime
103
+ version_requirements: *id008
104
+ - !ruby/object:Gem::Dependency
105
+ name: oauth
106
+ prerelease: false
107
+ requirement: &id009 !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ~>
111
+ - !ruby/object:Gem::Version
59
112
  version: 0.4.4
60
113
  type: :runtime
61
- version_requirements: *id003
114
+ version_requirements: *id009
115
+ - !ruby/object:Gem::Dependency
116
+ name: rack
117
+ prerelease: false
118
+ requirement: &id010 !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: "0"
124
+ type: :runtime
125
+ version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: oauth2
128
+ prerelease: false
129
+ requirement: &id011 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ version: "0"
135
+ type: :runtime
136
+ version_requirements: *id011
62
137
  description: Rails plugin for implementing an OAuth Provider or Consumer
63
138
  email: oauth-ruby@googlegroups.com
64
139
  executables: []
@@ -71,6 +146,8 @@ files:
71
146
  - .gitignore
72
147
  - CHANGELOG
73
148
  - Gemfile
149
+ - Gemfile.lock
150
+ - Guardfile
74
151
  - MIT-LICENSE
75
152
  - README.rdoc
76
153
  - Rakefile
@@ -105,10 +182,6 @@ files:
105
182
  - generators/oauth_provider/templates/clients_controller_spec.rb
106
183
  - generators/oauth_provider/templates/clients_controller_test.rb
107
184
  - generators/oauth_provider/templates/controller.rb
108
- - generators/oauth_provider/templates/controller_spec.rb
109
- - generators/oauth_provider/templates/controller_spec_helper.rb
110
- - generators/oauth_provider/templates/controller_test.rb
111
- - generators/oauth_provider/templates/controller_test_helper.rb
112
185
  - generators/oauth_provider/templates/edit.html.erb
113
186
  - generators/oauth_provider/templates/edit.html.haml
114
187
  - generators/oauth_provider/templates/index.html.erb
@@ -197,8 +270,6 @@ files:
197
270
  - lib/generators/rspec/templates/client_application_spec.rb
198
271
  - lib/generators/rspec/templates/client_applications.yml
199
272
  - lib/generators/rspec/templates/clients_controller_spec.rb
200
- - lib/generators/rspec/templates/controller_spec.rb
201
- - lib/generators/rspec/templates/controller_spec_helper.rb
202
273
  - lib/generators/rspec/templates/oauth2_token_spec.rb
203
274
  - lib/generators/rspec/templates/oauth2_verifier_spec.rb
204
275
  - lib/generators/rspec/templates/oauth_nonce_spec.rb
@@ -209,8 +280,6 @@ files:
209
280
  - lib/generators/test_unit/templates/client_application_test.rb
210
281
  - lib/generators/test_unit/templates/client_applications.yml
211
282
  - lib/generators/test_unit/templates/clients_controller_test.rb
212
- - lib/generators/test_unit/templates/controller_test.rb
213
- - lib/generators/test_unit/templates/controller_test_helper.rb
214
283
  - lib/generators/test_unit/templates/oauth_nonce_test.rb
215
284
  - lib/generators/test_unit/templates/oauth_nonces.yml
216
285
  - lib/generators/test_unit/templates/oauth_token_test.rb
@@ -224,6 +293,7 @@ files:
224
293
  - lib/oauth/models/consumers/services/agree2_token.rb
225
294
  - lib/oauth/models/consumers/services/fireeagle_token.rb
226
295
  - lib/oauth/models/consumers/services/google_token.rb
296
+ - lib/oauth/models/consumers/services/oauth2_token.rb
227
297
  - lib/oauth/models/consumers/services/opentransact_token.rb
228
298
  - lib/oauth/models/consumers/services/picomoney_token.rb
229
299
  - lib/oauth/models/consumers/services/twitter_token.rb
@@ -232,6 +302,8 @@ files:
232
302
  - lib/oauth/rack/oauth_filter.rb
233
303
  - oauth-plugin.gemspec
234
304
  - rails/init.rb
305
+ - spec/rack/oauth_filter_spec.rb
306
+ - spec/spec_helper.rb
235
307
  - tasks/oauth_tasks.rake
236
308
  - uninstall.rb
237
309
  has_rdoc: true
@@ -248,25 +320,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
248
320
  requirements:
249
321
  - - ">="
250
322
  - !ruby/object:Gem::Version
251
- segments:
252
- - 0
253
323
  version: "0"
254
324
  required_rubygems_version: !ruby/object:Gem::Requirement
255
325
  none: false
256
326
  requirements:
257
327
  - - ">"
258
328
  - !ruby/object:Gem::Version
259
- segments:
260
- - 1
261
- - 3
262
- - 1
263
329
  version: 1.3.1
264
330
  requirements: []
265
331
 
266
332
  rubyforge_project: oauth
267
- rubygems_version: 1.3.7
333
+ rubygems_version: 1.6.2
268
334
  signing_key:
269
335
  specification_version: 3
270
336
  summary: Ruby on Rails Plugin for OAuth Provider and Consumer
271
- test_files: []
272
-
337
+ test_files:
338
+ - spec/rack/oauth_filter_spec.rb
339
+ - spec/spec_helper.rb