oauth 0.5.6 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +483 -0
  3. data/CODE_OF_CONDUCT.md +84 -0
  4. data/CONTRIBUTING.md +23 -0
  5. data/LICENSE +18 -17
  6. data/README.md +190 -0
  7. data/SECURITY.md +16 -0
  8. data/TODO +0 -0
  9. data/bin/oauth +2 -2
  10. data/lib/oauth/cli/authorize_command.rb +0 -0
  11. data/lib/oauth/cli/base_command.rb +1 -1
  12. data/lib/oauth/cli/help_command.rb +0 -0
  13. data/lib/oauth/cli/query_command.rb +0 -0
  14. data/lib/oauth/cli/sign_command.rb +0 -0
  15. data/lib/oauth/cli/version_command.rb +0 -0
  16. data/lib/oauth/cli.rb +18 -18
  17. data/lib/oauth/client/action_controller_request.rb +7 -7
  18. data/lib/oauth/client/em_http.rb +99 -99
  19. data/lib/oauth/client/helper.rb +22 -22
  20. data/lib/oauth/client/net_http.rb +5 -5
  21. data/lib/oauth/client.rb +0 -0
  22. data/lib/oauth/consumer.rb +49 -38
  23. data/lib/oauth/errors/error.rb +0 -0
  24. data/lib/oauth/errors/problem.rb +0 -0
  25. data/lib/oauth/errors/unauthorized.rb +3 -1
  26. data/lib/oauth/errors.rb +3 -3
  27. data/lib/oauth/helper.rb +11 -7
  28. data/lib/oauth/oauth.rb +0 -0
  29. data/lib/oauth/oauth_test_helper.rb +4 -4
  30. data/lib/oauth/request_proxy/action_controller_request.rb +56 -57
  31. data/lib/oauth/request_proxy/action_dispatch_request.rb +8 -4
  32. data/lib/oauth/request_proxy/base.rb +136 -132
  33. data/lib/oauth/request_proxy/curb_request.rb +49 -43
  34. data/lib/oauth/request_proxy/em_http_request.rb +59 -49
  35. data/lib/oauth/request_proxy/jabber_request.rb +12 -9
  36. data/lib/oauth/request_proxy/mock_request.rb +4 -2
  37. data/lib/oauth/request_proxy/net_http.rb +63 -54
  38. data/lib/oauth/request_proxy/rack_request.rb +35 -31
  39. data/lib/oauth/request_proxy/rest_client_request.rb +53 -50
  40. data/lib/oauth/request_proxy/typhoeus_request.rb +51 -45
  41. data/lib/oauth/request_proxy.rb +0 -0
  42. data/lib/oauth/server.rb +2 -2
  43. data/lib/oauth/signature/base.rb +8 -6
  44. data/lib/oauth/signature/hmac/sha1.rb +4 -4
  45. data/lib/oauth/signature/hmac/sha256.rb +4 -4
  46. data/lib/oauth/signature/plaintext.rb +2 -2
  47. data/lib/oauth/signature/rsa/sha1.rb +3 -3
  48. data/lib/oauth/signature.rb +0 -0
  49. data/lib/oauth/token.rb +5 -5
  50. data/lib/oauth/tokens/access_token.rb +3 -3
  51. data/lib/oauth/tokens/consumer_token.rb +0 -0
  52. data/lib/oauth/tokens/request_token.rb +0 -0
  53. data/lib/oauth/tokens/server_token.rb +0 -0
  54. data/lib/oauth/tokens/token.rb +0 -0
  55. data/lib/oauth/version.rb +1 -1
  56. data/lib/oauth.rb +8 -7
  57. metadata +47 -92
  58. data/README.rdoc +0 -88
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.5.6
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pelle Braendgaard
@@ -12,53 +12,12 @@ authors:
12
12
  - Seth Fitzsimmons
13
13
  - Matt Sanford
14
14
  - Aaron Quint
15
- autorequire:
15
+ - Peter Boling
16
+ autorequire:
16
17
  bindir: bin
17
18
  cert_chain: []
18
- date: 2021-04-02 00:00:00.000000000 Z
19
+ date: 2021-11-10 00:00:00.000000000 Z
19
20
  dependencies:
20
- - !ruby/object:Gem::Dependency
21
- name: rake
22
- requirement: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- type: :development
28
- prerelease: false
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- - !ruby/object:Gem::Dependency
35
- name: minitest
36
- requirement: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- type: :development
42
- prerelease: false
43
- version_requirements: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- - !ruby/object:Gem::Dependency
49
- name: byebug
50
- requirement: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- type: :development
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
21
  - !ruby/object:Gem::Dependency
63
22
  name: actionpack
64
23
  requirement: !ruby/object:Gem::Requirement
@@ -74,7 +33,7 @@ dependencies:
74
33
  - !ruby/object:Gem::Version
75
34
  version: '5.0'
76
35
  - !ruby/object:Gem::Dependency
77
- name: iconv
36
+ name: curb
78
37
  requirement: !ruby/object:Gem::Requirement
79
38
  requirements:
80
39
  - - ">="
@@ -88,21 +47,21 @@ dependencies:
88
47
  - !ruby/object:Gem::Version
89
48
  version: '0'
90
49
  - !ruby/object:Gem::Dependency
91
- name: rack
50
+ name: em-http-request
92
51
  requirement: !ruby/object:Gem::Requirement
93
52
  requirements:
94
53
  - - "~>"
95
54
  - !ruby/object:Gem::Version
96
- version: '2.0'
55
+ version: 1.1.7
97
56
  type: :development
98
57
  prerelease: false
99
58
  version_requirements: !ruby/object:Gem::Requirement
100
59
  requirements:
101
60
  - - "~>"
102
61
  - !ruby/object:Gem::Version
103
- version: '2.0'
62
+ version: 1.1.7
104
63
  - !ruby/object:Gem::Dependency
105
- name: rack-test
64
+ name: iconv
106
65
  requirement: !ruby/object:Gem::Requirement
107
66
  requirements:
108
67
  - - ">="
@@ -116,55 +75,49 @@ dependencies:
116
75
  - !ruby/object:Gem::Version
117
76
  version: '0'
118
77
  - !ruby/object:Gem::Dependency
119
- name: mocha
78
+ name: minitest
120
79
  requirement: !ruby/object:Gem::Requirement
121
80
  requirements:
122
81
  - - ">="
123
82
  - !ruby/object:Gem::Version
124
- version: 0.9.12
125
- - - "<="
126
- - !ruby/object:Gem::Version
127
- version: 1.1.0
83
+ version: '0'
128
84
  type: :development
129
85
  prerelease: false
130
86
  version_requirements: !ruby/object:Gem::Requirement
131
87
  requirements:
132
88
  - - ">="
133
89
  - !ruby/object:Gem::Version
134
- version: 0.9.12
135
- - - "<="
136
- - !ruby/object:Gem::Version
137
- version: 1.1.0
90
+ version: '0'
138
91
  - !ruby/object:Gem::Dependency
139
- name: typhoeus
92
+ name: mocha
140
93
  requirement: !ruby/object:Gem::Requirement
141
94
  requirements:
142
95
  - - ">="
143
96
  - !ruby/object:Gem::Version
144
- version: 0.1.13
97
+ version: '0'
145
98
  type: :development
146
99
  prerelease: false
147
100
  version_requirements: !ruby/object:Gem::Requirement
148
101
  requirements:
149
102
  - - ">="
150
103
  - !ruby/object:Gem::Version
151
- version: 0.1.13
104
+ version: '0'
152
105
  - !ruby/object:Gem::Dependency
153
- name: em-http-request
106
+ name: rack
154
107
  requirement: !ruby/object:Gem::Requirement
155
108
  requirements:
156
- - - '='
109
+ - - "~>"
157
110
  - !ruby/object:Gem::Version
158
- version: 0.2.11
111
+ version: '2.0'
159
112
  type: :development
160
113
  prerelease: false
161
114
  version_requirements: !ruby/object:Gem::Requirement
162
115
  requirements:
163
- - - '='
116
+ - - "~>"
164
117
  - !ruby/object:Gem::Version
165
- version: 0.2.11
118
+ version: '2.0'
166
119
  - !ruby/object:Gem::Dependency
167
- name: curb
120
+ name: rack-test
168
121
  requirement: !ruby/object:Gem::Requirement
169
122
  requirements:
170
123
  - - ">="
@@ -178,21 +131,21 @@ dependencies:
178
131
  - !ruby/object:Gem::Version
179
132
  version: '0'
180
133
  - !ruby/object:Gem::Dependency
181
- name: webmock
134
+ name: rake
182
135
  requirement: !ruby/object:Gem::Requirement
183
136
  requirements:
184
- - - "<"
137
+ - - "~>"
185
138
  - !ruby/object:Gem::Version
186
- version: '2.0'
139
+ version: '13.0'
187
140
  type: :development
188
141
  prerelease: false
189
142
  version_requirements: !ruby/object:Gem::Requirement
190
143
  requirements:
191
- - - "<"
144
+ - - "~>"
192
145
  - !ruby/object:Gem::Version
193
- version: '2.0'
146
+ version: '13.0'
194
147
  - !ruby/object:Gem::Dependency
195
- name: codeclimate-test-reporter
148
+ name: rest-client
196
149
  requirement: !ruby/object:Gem::Requirement
197
150
  requirements:
198
151
  - - ">="
@@ -206,45 +159,47 @@ dependencies:
206
159
  - !ruby/object:Gem::Version
207
160
  version: '0'
208
161
  - !ruby/object:Gem::Dependency
209
- name: simplecov
162
+ name: typhoeus
210
163
  requirement: !ruby/object:Gem::Requirement
211
164
  requirements:
212
165
  - - ">="
213
166
  - !ruby/object:Gem::Version
214
- version: '0'
167
+ version: 0.1.13
215
168
  type: :development
216
169
  prerelease: false
217
170
  version_requirements: !ruby/object:Gem::Requirement
218
171
  requirements:
219
172
  - - ">="
220
173
  - !ruby/object:Gem::Version
221
- version: '0'
174
+ version: 0.1.13
222
175
  - !ruby/object:Gem::Dependency
223
- name: rest-client
176
+ name: webmock
224
177
  requirement: !ruby/object:Gem::Requirement
225
178
  requirements:
226
- - - ">="
179
+ - - "<="
227
180
  - !ruby/object:Gem::Version
228
- version: '0'
181
+ version: 3.14.0
229
182
  type: :development
230
183
  prerelease: false
231
184
  version_requirements: !ruby/object:Gem::Requirement
232
185
  requirements:
233
- - - ">="
186
+ - - "<="
234
187
  - !ruby/object:Gem::Version
235
- version: '0'
236
- description:
237
- email: oauth-ruby@googlegroupspec.com
188
+ version: 3.14.0
189
+ description:
190
+ email: oauth-ruby@googlegroups.com
238
191
  executables:
239
192
  - oauth
240
193
  extensions: []
241
194
  extra_rdoc_files:
242
- - LICENSE
243
- - README.rdoc
244
195
  - TODO
245
196
  files:
197
+ - CHANGELOG.md
198
+ - CODE_OF_CONDUCT.md
199
+ - CONTRIBUTING.md
246
200
  - LICENSE
247
- - README.rdoc
201
+ - README.md
202
+ - SECURITY.md
248
203
  - TODO
249
204
  - bin/oauth
250
205
  - lib/oauth.rb
@@ -299,11 +254,11 @@ licenses:
299
254
  - MIT
300
255
  metadata:
301
256
  bug_tracker_uri: https://github.com/oauth-xx/oauth-ruby/issues
302
- changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/master/HISTORY
303
- documentation_uri: https://rdoc.info/github/oauth-xx/oauth-ruby/master/frames
257
+ changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/master/CHANGELOG.md
258
+ documentation_uri: https://rubydoc.info/github/oauth-xx/oauth-ruby/master
304
259
  homepage_uri: https://github.com/oauth-xx/oauth-ruby
305
260
  source_code_uri: https://github.com/oauth-xx/oauth-ruby
306
- post_install_message:
261
+ post_install_message:
307
262
  rdoc_options: []
308
263
  require_paths:
309
264
  - lib
@@ -318,8 +273,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
273
  - !ruby/object:Gem::Version
319
274
  version: '0'
320
275
  requirements: []
321
- rubygems_version: 3.0.3
322
- signing_key:
276
+ rubygems_version: 3.0.3.1
277
+ signing_key:
323
278
  specification_version: 4
324
279
  summary: OAuth Core Ruby implementation
325
280
  test_files: []
data/README.rdoc DELETED
@@ -1,88 +0,0 @@
1
- = Ruby OAuth
2
-
3
- == Status
4
-
5
- {<img src="https://travis-ci.org/oauth-xx/oauth-ruby.svg?branch=master" alt="Build Status" />}[https://travis-ci.com/github/oauth-xx/oauth-ruby]
6
-
7
-
8
-
9
- == What
10
-
11
- This is a RubyGem for implementing both OAuth clients and servers in Ruby applications.
12
-
13
- See the OAuth specs http://oauth.net/core/1.0/
14
-
15
- == Installing
16
-
17
- sudo gem install oauth
18
-
19
- The source code is now hosted on the OAuth GitHub Project http://github.com/oauth-xx/oauth-ruby
20
-
21
- == The basics
22
-
23
- This is a ruby library which is intended to be used in creating Ruby Consumer and Service Provider applications. It is NOT a Rails plugin, but could easily be used for the foundation for such a Rails plugin.
24
-
25
- As a matter of fact it has been pulled out from an OAuth Rails GEM (https://rubygems.org/gems/oauth-plugin https://github.com/pelle/oauth-plugin) which now uses this gem as a dependency.
26
-
27
- == Demonstration of usage
28
-
29
- We need to specify the oauth_callback url explicitly, otherwise it defaults to "oob" (Out of Band)
30
-
31
- callback_url = "http://127.0.0.1:3000/oauth/callback"
32
-
33
- Create a new `OAuth::Consumer` instance by passing it a configuration hash:
34
-
35
- oauth_consumer = OAuth::Consumer.new("key", "secret", :site => "https://agree2")
36
-
37
- Start the process by requesting a token
38
-
39
- request_token = oauth_consumer.get_request_token(:oauth_callback => callback_url)
40
-
41
- session[:token] = request_token.token
42
- session[:token_secret] = request_token.secret
43
- redirect_to request_token.authorize_url(:oauth_callback => callback_url)
44
-
45
- When user returns create an access_token
46
-
47
- hash = { oauth_token: session[:token], oauth_token_secret: session[:token_secret]}
48
- request_token = OAuth::RequestToken.from_hash(oauth_consumer, hash)
49
- access_token = request_token.get_access_token
50
- # For 3-legged authorization, flow oauth_verifier is passed as param in callback
51
- # access_token = request_token.get_access_token(oauth_verifier: params[:oauth_verifier])
52
- @photos = access_token.get('/photos.xml')
53
-
54
- Now that you have an access token, you can use Typhoeus to interact with the OAuth provider if you choose.
55
-
56
- require 'typhoeus'
57
- require 'oauth/request_proxy/typhoeus_request'
58
- oauth_params = {:consumer => oauth_consumer, :token => access_token}
59
- hydra = Typhoeus::Hydra.new
60
- req = Typhoeus::Request.new(uri, options) # :method needs to be specified in options
61
- oauth_helper = OAuth::Client::Helper.new(req, oauth_params.merge(:request_uri => uri))
62
- req.options[:headers].merge!({"Authorization" => oauth_helper.header}) # Signs the request
63
- hydra.queue(req)
64
- hydra.run
65
- @response = req.response
66
-
67
-
68
- == More Information
69
-
70
- * RDoc: http://rdoc.info/github/oauth-xx/oauth-ruby/master/frames
71
- * Mailing List/Google Group: http://groups.google.com/group/oauth-ruby
72
-
73
- == How to submit patches
74
-
75
- The source code is now hosted on the OAuth GitHub Project http://github.com/oauth-xx/oauth-ruby
76
-
77
- To submit a patch, please fork the oauth project and create a patch with tests. Once you're happy with it send a pull request and post a message to the google group.
78
-
79
- == License
80
-
81
- This code is free to use under the terms of the MIT license.
82
-
83
- == Contact
84
-
85
- OAuth Ruby has been created and maintained by a large number of talented individuals.
86
- The current maintainer is Aaron Quint (quirkey).
87
-
88
- Comments are welcome. Send an email to via the OAuth Ruby mailing list http://groups.google.com/group/oauth-ruby