signet 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/signet/oauth_2/client.rb +5 -4
- data/lib/signet/version.rb +1 -1
- data/spec/signet/oauth_2/client_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec4912c2e8dee5bddbb079ad27efb8d99654abaf
|
4
|
+
data.tar.gz: 3e9118048022e46c0e50a25256e2448283ace5df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 48faf986e4169b761eabc7b03268e427417ce2cb7aa575dd6364e4e3883a74492b6b554c3ea950455229af51dcaab31b6fdddcdee8836f1b5361ad8c1408daf1
|
7
|
+
data.tar.gz: 6689401b7e31bf871e4264e8d12810aea2821220c05d9afb962e875b61104b085c1275e12a9c3279988f215982647918461af0a5c6108e964c2eb754c7d65618
|
data/CHANGELOG.md
CHANGED
@@ -956,15 +956,16 @@ module Signet
|
|
956
956
|
client = options[:connection] ||= Faraday.default_connection
|
957
957
|
url = Addressable::URI.parse(self.token_credential_uri).normalize.to_s
|
958
958
|
parameters = self.generate_access_token_request(options)
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
959
|
+
if client.is_a?(Faraday::Connection)
|
960
|
+
response = client.post url,
|
961
|
+
Addressable::URI.form_encode(parameters),
|
962
|
+
{ 'Content-Type' => 'application/x-www-form-urlencoded' }
|
963
963
|
status = response.status.to_i
|
964
964
|
body = response.body
|
965
965
|
content_type = response.headers['Content-type']
|
966
966
|
else
|
967
967
|
# Hurley
|
968
|
+
response = client.post url, parameters
|
968
969
|
status = response.status_code.to_i
|
969
970
|
body = response.body
|
970
971
|
content_type = response.header[:content_type]
|
data/lib/signet/version.rb
CHANGED
@@ -263,7 +263,7 @@ describe Signet::OAuth2::Client, 'configured for assertions profile' do
|
|
263
263
|
it 'should send valid access token request' do
|
264
264
|
stubs = Faraday::Adapter::Test::Stubs.new do |stub|
|
265
265
|
stub.post('/o/oauth2/token') do |env|
|
266
|
-
params = env[:body]
|
266
|
+
params = Addressable::URI.form_unencode(env[:body])
|
267
267
|
claim, header = JWT.decode(params.assoc("assertion").last, @key.public_key)
|
268
268
|
expect(params.assoc("grant_type")).to eq ['grant_type','urn:ietf:params:oauth:grant-type:jwt-bearer']
|
269
269
|
build_json_response({
|
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.7.
|
4
|
+
version: 0.7.2
|
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: 2015-12-
|
12
|
+
date: 2015-12-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|