bootic_client 0.0.6 → 0.0.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44cb025e788fcf5db4f335c6714b051a970e9647
4
- data.tar.gz: 6871584b9fc940f4117e8c841f4ac1b85588121a
3
+ metadata.gz: 8095f21114667841cc61f8048100b8f31e56f34e
4
+ data.tar.gz: 1022b40385355b90b2a478af677dd7221d5bc68b
5
5
  SHA512:
6
- metadata.gz: 8d2f579c6dca54966104b03b8518a5e9b32910b4195e62c2d84fa01ead10a5c16ae5465f4ea00349e8679c30b0beb0077a8f1392c0cf0e7adb47500b2f3b73dd
7
- data.tar.gz: f03e36499a5275ae7a999f2be58ce05ce76d54eccb79a57fdf3388fec72b2d11f38c1e1eaa5412d5277f4bafaa485cdccba3a5dceeb25895d3daa4347787b185
6
+ metadata.gz: ff530bf2fc8d5c4215ddf7838685fb7550e6e38b2085c109d8d5878ddae3ef263cb667803f751dfba15cfe0e8be127cbcf9654e9735091b87ba0164334039e00
7
+ data.tar.gz: aada7437aa9a191accd6cd72e96fd21ff22fb85cd53ebe024929523d9ace1c95fe02fd24ff953a51b6b5bbdfb8ff547b46878a1193bbc8b30d63a1657d68a6c4
@@ -11,9 +11,9 @@ module BooticClient
11
11
  end
12
12
 
13
13
  def get_token
14
- # The JWT grant must have an expiration date, in seconds since the epoch.
14
+ # The JWT grant must have an expiration date, in seconds since the epoch.
15
15
  # For most cases a few seconds should be enough.
16
- exp = Time.now.utc.to_i + 5
16
+ exp = Time.now.utc.to_i + 30
17
17
 
18
18
  # Use the "assertion" flow to exchange the JWT grant for an access token
19
19
  access_token = auth.assertion.get_token(
@@ -35,4 +35,4 @@ module BooticClient
35
35
  end
36
36
 
37
37
  strategies[:authorized] = Strategies::Authorized
38
- end
38
+ end
@@ -1,3 +1,3 @@
1
1
  module BooticClient
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -12,7 +12,7 @@ describe 'BooticClient::Strategies::Authorized' do
12
12
  iss: client_id,
13
13
  aud: 'api',
14
14
  prn: expired_token,
15
- exp: now.utc.to_i + 5
15
+ exp: now.utc.to_i + 30
16
16
  }, client_secret, 'HS256')
17
17
  end
18
18
 
@@ -28,11 +28,11 @@ describe 'BooticClient::Strategies::Authorized' do
28
28
 
29
29
  stub_request(:post, "https://auth.bootic.net/oauth/token").
30
30
  with(body: {
31
- "assertion" => jwt_assertion(expired_token, now),
31
+ "assertion" => jwt_assertion(expired_token, now),
32
32
  "assertion_type" => "urn:ietf:params:oauth:grant-type:jwt-bearer",
33
33
  "client_id" => "",
34
- "client_secret" => "",
35
- "grant_type" => "assertion",
34
+ "client_secret" => "",
35
+ "grant_type" => "assertion",
36
36
  "scope"=>""
37
37
  },
38
38
  headers: {
@@ -147,7 +147,7 @@ describe 'BooticClient::Strategies::Authorized' do
147
147
 
148
148
  describe '#from_hash' do
149
149
  it 'builds and returns an entity' do
150
- entity = client.from_hash('name' => 'foo', '_links' => {'delete' => {'href' => '/foo/bar'}})
150
+ entity = client.from_hash('name' => 'foo', '_links' => {'delete' => {'href' => '/foo/bar'}})
151
151
  expect(entity).to be_kind_of(BooticClient::Entity)
152
152
  expect(entity.name).to eql('foo')
153
153
  expect(entity.can?(:delete)).to be true
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootic_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ismael Celis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday