oauth 0.5.12 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +41 -3
- data/README.md +56 -46
- data/SECURITY.md +0 -2
- 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 +29 -31
@@ -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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pelle Braendgaard
|
@@ -19,19 +19,19 @@ cert_chain: []
|
|
19
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,18 +254,18 @@ 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.1
|
258
|
+
changelog_uri: https://github.com/oauth-xx/oauth-ruby/blob/v0.6.1/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.1
|
261
261
|
wiki_uri: https://github.com/oauth-xx/oauth-ruby/wiki
|
262
262
|
rubygems_mfa_required: 'true'
|
263
|
-
post_install_message: |2
|
263
|
+
post_install_message: |2
|
264
264
|
|
265
|
-
You have installed oauth version 0.
|
265
|
+
You have installed oauth version 0.6.1, congratulations!
|
266
266
|
|
267
|
-
|
268
|
-
The only breaking change will be dropped support for Ruby 2.
|
267
|
+
Non-commercial support for the 0.6.x series will end in April, 2024. Please upgrade to 1.0.x as soon as possible!
|
268
|
+
The only breaking change will be dropped support for Ruby 2.4, 2.5, and 2.6.
|
269
269
|
|
270
270
|
Please see:
|
271
271
|
• https://github.com/oauth-xx/oauth/blob/main/SECURITY.md
|
@@ -286,7 +286,6 @@ post_install_message: |2+
|
|
286
286
|
Please report issues, and support the project!
|
287
287
|
|
288
288
|
Thanks, |7eter l-|. l3oling
|
289
|
-
|
290
289
|
rdoc_options: []
|
291
290
|
require_paths:
|
292
291
|
- lib
|
@@ -294,7 +293,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
293
|
requirements:
|
295
294
|
- - ">="
|
296
295
|
- !ruby/object:Gem::Version
|
297
|
-
version: '2.
|
296
|
+
version: '2.4'
|
298
297
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
298
|
requirements:
|
300
299
|
- - ">="
|
@@ -306,4 +305,3 @@ signing_key:
|
|
306
305
|
specification_version: 4
|
307
306
|
summary: OAuth Core Ruby implementation
|
308
307
|
test_files: []
|
309
|
-
...
|