kinetic_sdk 5.0.1 → 5.0.2.beta.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 18c478a3afc4b073afa628b292c7ac5969c716a0798661ef026d7776d97f14c1
4
- data.tar.gz: 4467569db558fe14c1ed598b8e7cec0e947a49bea2d9cff85c5b20db51767c82
3
+ metadata.gz: 0f9331c7328d2187ea95746a7a2952f44e3ac1b198f8cabf566ea6ff5b58a8ac
4
+ data.tar.gz: d50e2d48718544ecfe32dd0e20b4abdfa76d4a1eeef00b18067a7c5c64231ac5
5
5
  SHA512:
6
- metadata.gz: 8eded8d95f577ebc97a145eaf5020bf72f797b58e53cf7bf6f41dbb017b92c20910e57860b0aa7475e30374ecbd7db086e34a044e54a51ce6411a8cce23bf8f1
7
- data.tar.gz: 64b247c587c1f1f8540666ff743da35369d18b2be821aff2047d6c0ac4bafe2d3d5c7d0053814eb58d4eee6db62c435c501d5ef5954c0d6af5c27ceb1f14df05
6
+ metadata.gz: 90422f1dfed6388eda26173b3b4fbd4a11c0d4accc04339d8a7d26e57230fecddc61cf42f15d5f5b0daeaf3dc2914d4a30f1bd2f28097b252bd002104ec9fde5
7
+ data.tar.gz: e76f1cd79404430b6c77df063f9f408e498d450fa91e64ffbf90104dd33d9fdd3687bf8f6008eadde20c1bf5b7503704710cac91172cea6e72ce5e4f6d228f8f
@@ -7,14 +7,14 @@ module KineticSdk
7
7
  # @param client_secret [String] the oauth client secret
8
8
  # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
9
9
  # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
10
- def jwt_token(client_id, client_secret, headers=default_headers)
10
+ def jwt_token(client_id, client_secret, headers = default_headers)
11
11
  # retrieve the jwt code
12
12
  jwt_code = jwt_code(client_id, headers)
13
13
  # retrieve the jwt token
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, 0)
17
+ response = post(url, {}, token_headers)
18
18
 
19
19
  if response.status == 401
20
20
  raise StandardError.new "#{response.message}, the oauth client id and secret are invalid."
@@ -29,18 +29,18 @@ module KineticSdk
29
29
  #
30
30
  # This method should really never need to be called externally.
31
31
  #
32
- # @param client_id [String]
32
+ # @param client_id [String]
33
33
  # @param headers [Hash] hash of headers to send, default is basic authentication and accept JSON content type
34
34
  # @return [KineticSdk::Utils::KineticHttpResponse] object, with +code+, +message+, +content_string+, and +content+ properties
35
- def jwt_code(client_id, headers=default_headers)
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, -1)
38
+ response = post(url, {}, headers)
39
39
 
40
40
  if response.status == 401
41
- raise StandardError.new "#{response.message}: #{response.content['error']}"
41
+ raise StandardError.new "#{response.message}: #{response.content["error"]}"
42
42
  elsif response.status == 302
43
- location = response.headers['location']
43
+ location = response.headers["location"]
44
44
  if location.nil?
45
45
  raise StandardError.new "Unable to retrieve code: #{response.inspect}"
46
46
  else
@@ -50,6 +50,5 @@ module KineticSdk
50
50
  raise StandardError.new "Unable to retrieve code #{response.inspect}"
51
51
  end
52
52
  end
53
-
54
53
  end
55
- end
54
+ end
@@ -3,5 +3,5 @@ module KineticSdk
3
3
  # Version of Kinetic SDK
4
4
  #
5
5
  # @return [String] Version of the SDK
6
- VERSION = "5.0.1"
6
+ VERSION = "5.0.2.beta.1"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kinetic_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kinetic Data
@@ -417,9 +417,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
417
417
  version: '0'
418
418
  required_rubygems_version: !ruby/object:Gem::Requirement
419
419
  requirements:
420
- - - ">="
420
+ - - ">"
421
421
  - !ruby/object:Gem::Version
422
- version: '0'
422
+ version: 1.3.1
423
423
  requirements: []
424
424
  rubygems_version: 3.0.6
425
425
  signing_key: