signet 0.16.0 → 0.16.1
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 +7 -0
- data/lib/signet/oauth_1/client.rb +1 -1
- data/lib/signet/oauth_1/server.rb +2 -2
- data/lib/signet/oauth_2/client.rb +8 -1
- data/lib/signet/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 53569e11ad43433cd62b3d887bc959a632a835e6fa72ada936856967820e24df
|
|
4
|
+
data.tar.gz: 30970162c79ed861a09a6424bb84822685a2f5413d9ac1c0b5172cad3fa8a197
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e4d619adaec9829803ac0fbc1e6f3c13f6d2b03caa64252bc35d4df0bcd72b9ef995b3f1a157c5ab02e328c88ca0d74b25edefebbf08e7ab41361017a5d5fdd8
|
|
7
|
+
data.tar.gz: ea2ed4ad72eace1d2ec0936a0243ca7ad07920cc9fee43a27f2c3f6de100370c60953a7842f6a416490e5bd93d7f17ff7771d7c7ef515fe8ad7ffcc4474547a1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Release History
|
|
2
2
|
|
|
3
|
+
### [0.16.1](https://www.github.com/googleapis/signet/compare/signet/v0.16.0...signet/v0.16.1) (2022-02-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* Support Faraday 2 ([f1c6cc3](https://www.github.com/googleapis/signet/commit/f1c6cc373876ea84281fadf72d7041976f2bc133))
|
|
9
|
+
|
|
3
10
|
## [0.16.0](https://www.github.com/googleapis/signet/compare/signet/v0.15.0...signet/v0.16.0) (2021-09-03)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -926,7 +926,7 @@ module Signet
|
|
|
926
926
|
|
|
927
927
|
content_type = request["Content-Type"].to_s
|
|
928
928
|
content_type = content_type.split(";", 2).first if content_type.index ";"
|
|
929
|
-
if request.
|
|
929
|
+
if request.http_method == :post && content_type == "application/x-www-form-urlencoded"
|
|
930
930
|
# Serializes the body in case a hash/array was passed. Noop if already string like
|
|
931
931
|
encoder = Faraday::Request::UrlEncoded.new(->(_env) {})
|
|
932
932
|
encoder.call env
|
|
@@ -152,12 +152,12 @@ module Signet
|
|
|
152
152
|
# @return [Hash] normalized request components
|
|
153
153
|
def verify_request_components options = {}
|
|
154
154
|
if options[:request]
|
|
155
|
-
if options[:request].is_a?
|
|
155
|
+
if options[:request].is_a? Faraday::Request
|
|
156
156
|
request = options[:request]
|
|
157
157
|
elsif options[:adapter]
|
|
158
158
|
request = options[:adapter].adapt_request options[:request]
|
|
159
159
|
end
|
|
160
|
-
method = request.
|
|
160
|
+
method = request.http_method
|
|
161
161
|
uri = request.path
|
|
162
162
|
headers = request.headers
|
|
163
163
|
body = request.body
|
|
@@ -993,7 +993,14 @@ module Signet
|
|
|
993
993
|
url = Addressable::URI.parse token_credential_uri
|
|
994
994
|
parameters = generate_access_token_request options
|
|
995
995
|
if client.is_a? Faraday::Connection
|
|
996
|
-
|
|
996
|
+
if options[:use_basic_auth]
|
|
997
|
+
# The Basic Auth middleware usage differs before and after Faraday v2
|
|
998
|
+
if Gem::Version.new(Faraday::VERSION).segments.first >= 2
|
|
999
|
+
client.request :authorization, :basic, client_id, client_secret
|
|
1000
|
+
else
|
|
1001
|
+
client.request :basic_auth, client_id, client_secret
|
|
1002
|
+
end
|
|
1003
|
+
end
|
|
997
1004
|
response = client.post url.normalize.to_s,
|
|
998
1005
|
Addressable::URI.form_encode(parameters),
|
|
999
1006
|
"Content-Type" => "application/x-www-form-urlencoded"
|
data/lib/signet/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: signet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.16.
|
|
4
|
+
version: 0.16.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bob Aman
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2022-02-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: addressable
|
|
@@ -31,20 +31,20 @@ dependencies:
|
|
|
31
31
|
requirements:
|
|
32
32
|
- - ">="
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: 0.17.
|
|
34
|
+
version: 0.17.5
|
|
35
35
|
- - "<"
|
|
36
36
|
- !ruby/object:Gem::Version
|
|
37
|
-
version: '
|
|
37
|
+
version: '3.0'
|
|
38
38
|
type: :runtime
|
|
39
39
|
prerelease: false
|
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
|
41
41
|
requirements:
|
|
42
42
|
- - ">="
|
|
43
43
|
- !ruby/object:Gem::Version
|
|
44
|
-
version: 0.17.
|
|
44
|
+
version: 0.17.5
|
|
45
45
|
- - "<"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
47
|
+
version: '3.0'
|
|
48
48
|
- !ruby/object:Gem::Dependency
|
|
49
49
|
name: jwt
|
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -228,7 +228,7 @@ homepage: https://github.com/googleapis/signet
|
|
|
228
228
|
licenses:
|
|
229
229
|
- Apache-2.0
|
|
230
230
|
metadata:
|
|
231
|
-
changelog_uri: https://github.com/googleapis/signet/blob/
|
|
231
|
+
changelog_uri: https://github.com/googleapis/signet/blob/main/CHANGELOG.md
|
|
232
232
|
source_code_uri: https://github.com/googleapis/signet
|
|
233
233
|
bug_tracker_uri: https://github.com/googleapis/signet/issues
|
|
234
234
|
post_install_message:
|
|
@@ -248,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
248
248
|
- !ruby/object:Gem::Version
|
|
249
249
|
version: 1.3.5
|
|
250
250
|
requirements: []
|
|
251
|
-
rubygems_version: 3.
|
|
251
|
+
rubygems_version: 3.3.5
|
|
252
252
|
signing_key:
|
|
253
253
|
specification_version: 4
|
|
254
254
|
summary: Signet is an OAuth 1.0 / OAuth 2.0 implementation.
|