kinetic_sdk 5.0.2.beta.1 → 5.0.2.beta.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/kinetic_sdk/core/lib/jwt.rb +2 -2
- data/lib/kinetic_sdk/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f0ed3e5026cda44775a08265242fb308f4087872042f9ae83fe07be60bc3da4
|
4
|
+
data.tar.gz: 21b04d6f6f72ab9a178685677a3c401046f2281abb941804494724e255516de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4145f47f693a6ea56a0b6b139165f6eb462a82c22c6c8b247f446c464196fec6d50cc26f330b1120246b39a522ac68db34ec92247d25ab9530b88ceb7fba0c1
|
7
|
+
data.tar.gz: a22b5abe153c559abb04a8b595c1edf9a1eaf8f81e068775307d19e3d57a537b2945d0bb8c302cef44526155a67976224888b894db6fca9643914b56705c98a4
|
@@ -14,7 +14,7 @@ module KineticSdk
|
|
14
14
|
@logger.info("Retrieving JWT authorization token")
|
15
15
|
url = "#{@server}/app/oauth/token?grant_type=authorization_code&response_type=token&client_id=#{client_id}&code=#{jwt_code}"
|
16
16
|
token_headers = header_accept_json.merge(header_basic_auth(client_id, client_secret))
|
17
|
-
response = post(url, {}, token_headers)
|
17
|
+
response = post(url, {}, token_headers, {:max_redirects: 0})
|
18
18
|
|
19
19
|
if response.status == 401
|
20
20
|
raise StandardError.new "#{response.message}, the oauth client id and secret are invalid."
|
@@ -35,7 +35,7 @@ module KineticSdk
|
|
35
35
|
def jwt_code(client_id, headers = default_headers)
|
36
36
|
@logger.info("Retrieving JWT authorization code")
|
37
37
|
url = "#{@server}/app/oauth/authorize?grant_type=authorization_code&response_type=code&client_id=#{client_id}"
|
38
|
-
response = post(url, {}, headers)
|
38
|
+
response = post(url, {}, headers, {:max_redirects: -1})
|
39
39
|
|
40
40
|
if response.status == 401
|
41
41
|
raise StandardError.new "#{response.message}: #{response.content["error"]}"
|
data/lib/kinetic_sdk/version.rb
CHANGED