oauth 0.5.14 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -31
- data/CONTRIBUTING.md +2 -2
- data/README.md +65 -61
- data/SECURITY.md +5 -13
- data/bin/oauth +8 -4
- data/lib/oauth/cli/authorize_command.rb +58 -54
- data/lib/oauth/cli/base_command.rb +163 -159
- data/lib/oauth/cli/help_command.rb +9 -5
- data/lib/oauth/cli/query_command.rb +26 -17
- data/lib/oauth/cli/sign_command.rb +58 -52
- data/lib/oauth/cli/version_command.rb +8 -4
- data/lib/oauth/cli.rb +2 -0
- data/lib/oauth/client/action_controller_request.rb +4 -1
- data/lib/oauth/client/em_http.rb +3 -1
- data/lib/oauth/client/helper.rb +76 -72
- data/lib/oauth/client/net_http.rb +111 -104
- data/lib/oauth/client.rb +2 -0
- data/lib/oauth/consumer.rb +50 -32
- data/lib/oauth/errors/error.rb +2 -0
- data/lib/oauth/errors/problem.rb +3 -0
- data/lib/oauth/errors/unauthorized.rb +4 -0
- data/lib/oauth/errors.rb +2 -0
- data/lib/oauth/helper.rb +9 -5
- data/lib/oauth/oauth.rb +4 -2
- data/lib/oauth/oauth_test_helper.rb +2 -0
- data/lib/oauth/request_proxy/base.rb +4 -4
- data/lib/oauth/request_proxy/mock_request.rb +1 -1
- data/lib/oauth/request_proxy/net_http.rb +8 -8
- data/lib/oauth/request_proxy/rest_client_request.rb +4 -3
- data/lib/oauth/request_proxy.rb +4 -1
- data/lib/oauth/server.rb +8 -4
- data/lib/oauth/signature/base.rb +73 -65
- data/lib/oauth/signature/hmac/sha1.rb +15 -9
- data/lib/oauth/signature/hmac/sha256.rb +15 -9
- data/lib/oauth/signature/plaintext.rb +18 -20
- data/lib/oauth/signature/rsa/sha1.rb +46 -38
- data/lib/oauth/signature.rb +3 -0
- data/lib/oauth/token.rb +2 -0
- data/lib/oauth/tokens/access_token.rb +2 -0
- data/lib/oauth/tokens/consumer_token.rb +2 -0
- data/lib/oauth/tokens/request_token.rb +5 -2
- data/lib/oauth/tokens/server_token.rb +2 -0
- data/lib/oauth/tokens/token.rb +2 -0
- data/lib/oauth/version.rb +5 -1
- data/lib/oauth.rb +8 -2
- metadata +28 -56
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module OAuth
|
2
4
|
# The RequestToken is used for the initial Request.
|
3
5
|
# This is normally created by the Consumer object.
|
@@ -23,7 +25,8 @@ module OAuth
|
|
23
25
|
|
24
26
|
# exchange for AccessToken on server
|
25
27
|
def get_access_token(options = {}, *arguments)
|
26
|
-
response = consumer.token_request(consumer.http_method,
|
28
|
+
response = consumer.token_request(consumer.http_method,
|
29
|
+
(consumer.access_token_url? ? consumer.access_token_url : consumer.access_token_path), self, options, *arguments)
|
27
30
|
OAuth::AccessToken.from_hash(consumer, response)
|
28
31
|
end
|
29
32
|
|
@@ -33,7 +36,7 @@ module OAuth
|
|
33
36
|
def build_url(base_url, params)
|
34
37
|
uri = URI.parse(base_url.to_s)
|
35
38
|
queries = {}
|
36
|
-
queries =
|
39
|
+
queries = URI.decode_www_form(uri.query).to_h if uri.query
|
37
40
|
# TODO: doesn't handle array values correctly
|
38
41
|
queries.merge!(params) if params
|
39
42
|
uri.query = URI.encode_www_form(queries) unless queries.empty?
|
data/lib/oauth/tokens/token.rb
CHANGED
data/lib/oauth/version.rb
CHANGED
data/lib/oauth.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# third party gems
|
4
|
+
require "version_gem"
|
3
5
|
|
4
6
|
require "oauth/version"
|
5
7
|
|
@@ -11,3 +13,7 @@ require "oauth/signature/hmac/sha1"
|
|
11
13
|
require "oauth/signature/hmac/sha256"
|
12
14
|
require "oauth/signature/rsa/sha1"
|
13
15
|
require "oauth/request_proxy/mock_request"
|
16
|
+
|
17
|
+
OAuth::Version.class_eval do
|
18
|
+
extend VersionGem::Basic
|
19
|
+
end
|
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.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pelle Braendgaard
|
@@ -16,22 +16,22 @@ authors:
|
|
16
16
|
autorequire:
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
|
-
date: 2022-08-
|
19
|
+
date: 2022-08-23 00:00:00.000000000 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name:
|
22
|
+
name: version_gem
|
23
23
|
requirement: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
28
|
-
type: :
|
27
|
+
version: '1.1'
|
28
|
+
type: :runtime
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '
|
34
|
+
version: '1.1'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: em-http-request
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|
@@ -64,16 +64,16 @@ dependencies:
|
|
64
64
|
name: minitest
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 5.15.0
|
70
70
|
type: :development
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- - "
|
74
|
+
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version:
|
76
|
+
version: 5.15.0
|
77
77
|
- !ruby/object:Gem::Dependency
|
78
78
|
name: mocha
|
79
79
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,16 +92,16 @@ dependencies:
|
|
92
92
|
name: rack
|
93
93
|
requirement: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- - "
|
95
|
+
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '0'
|
97
|
+
version: '2.0'
|
98
98
|
type: :development
|
99
99
|
prerelease: false
|
100
100
|
version_requirements: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0'
|
104
|
+
version: '2.0'
|
105
105
|
- !ruby/object:Gem::Dependency
|
106
106
|
name: rack-test
|
107
107
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,16 +120,16 @@ dependencies:
|
|
120
120
|
name: rake
|
121
121
|
requirement: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0'
|
125
|
+
version: '13.0'
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0'
|
132
|
+
version: '13.0'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
134
|
name: rest-client
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,14 +150,14 @@ dependencies:
|
|
150
150
|
requirements:
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: '
|
153
|
+
version: '12.0'
|
154
154
|
type: :development
|
155
155
|
prerelease: false
|
156
156
|
version_requirements: !ruby/object:Gem::Requirement
|
157
157
|
requirements:
|
158
158
|
- - "~>"
|
159
159
|
- !ruby/object:Gem::Version
|
160
|
-
version: '
|
160
|
+
version: '12.0'
|
161
161
|
- !ruby/object:Gem::Dependency
|
162
162
|
name: typhoeus
|
163
163
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,40 +254,13 @@ licenses:
|
|
254
254
|
- MIT
|
255
255
|
metadata:
|
256
256
|
homepage_uri: https://github.com/oauth-xx/oauth-ruby
|
257
|
-
source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v0.
|
258
|
-
changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v0.
|
257
|
+
source_code_uri: https://github.com/oauth-xx/oauth-ruby/tree/v0.6.0
|
258
|
+
changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v0.6.0/CHANGELOG.md
|
259
259
|
bug_tracker_uri: https://github.com/oauth-xx/oauth-ruby/issues
|
260
|
-
documentation_uri: https://www.rubydoc.info/gems/oauth/0.
|
260
|
+
documentation_uri: https://www.rubydoc.info/gems/oauth/0.6.0
|
261
261
|
wiki_uri: https://github.com/oauth-xx/oauth-ruby/wiki
|
262
262
|
rubygems_mfa_required: 'true'
|
263
|
-
post_install_message:
|
264
|
-
|
265
|
-
You have installed oauth version 0.5.14, congratulations!
|
266
|
-
|
267
|
-
Support for the 0.5.x series will end by April, 2023. Please upgrade to 0.6.x or 1.x as soon as possible!
|
268
|
-
For 0.6.x the only breaking change will be dropped support for Ruby 2.0, 2.1, 2.2, and 2.3.
|
269
|
-
For 1.x the only breaking change will be dropped support for Ruby 2.4, 2.5, and 2.6.
|
270
|
-
|
271
|
-
Please see:
|
272
|
-
• https://github.com/oauth-xx/oauth-ruby/blob/main/SECURITY.md
|
273
|
-
|
274
|
-
Note also that I am, and this project is, in the process of leaving Github.
|
275
|
-
I wrote about some of the reasons here:
|
276
|
-
• https://dev.to/galtzo/im-leaving-github-50ba
|
277
|
-
|
278
|
-
If you are a human, please consider a donation as I move toward supporting myself with Open Source work:
|
279
|
-
• https://liberapay.com/pboling
|
280
|
-
• https://ko-fi.com/pboling
|
281
|
-
• https://patreon.com/galtzo
|
282
|
-
|
283
|
-
If you are a corporation, please consider supporting this project, and open source work generally, with a TideLift subscription.
|
284
|
-
• https://tidelift.com/funding/github/rubygems/oauth
|
285
|
-
• Or hire me. I am looking for a job!
|
286
|
-
|
287
|
-
Please report issues, and support the project!
|
288
|
-
|
289
|
-
Thanks, |7eter l-|. l3oling
|
290
|
-
|
263
|
+
post_install_message:
|
291
264
|
rdoc_options: []
|
292
265
|
require_paths:
|
293
266
|
- lib
|
@@ -295,16 +268,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
295
268
|
requirements:
|
296
269
|
- - ">="
|
297
270
|
- !ruby/object:Gem::Version
|
298
|
-
version: '2.
|
271
|
+
version: '2.4'
|
299
272
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
300
273
|
requirements:
|
301
274
|
- - ">="
|
302
275
|
- !ruby/object:Gem::Version
|
303
276
|
version: '0'
|
304
277
|
requirements: []
|
305
|
-
rubygems_version: 3.3.
|
278
|
+
rubygems_version: 3.3.20
|
306
279
|
signing_key:
|
307
280
|
specification_version: 4
|
308
281
|
summary: OAuth Core Ruby implementation
|
309
282
|
test_files: []
|
310
|
-
...
|