bouncer-client 0.2 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e17c125be2501897971c0c22c6ca32a50952d9fa
4
- data.tar.gz: 972ca02953b1b93bfb24b87bd0fb23d71b7de85a
3
+ metadata.gz: 48e0baa7d9e6c6bcaa45cd62a57927e716568185
4
+ data.tar.gz: 17e56a7d1a6977c5195f465c855564525664a790
5
5
  SHA512:
6
- metadata.gz: b69f105cac219e2fa3c37feedfa7f4b9bba06c6f9e9b87ac446e39cb5ed4e6ecf3bacb21776d041ab7788f178f63e042e65c9f25aa84e7c01e26f23c380c27aa
7
- data.tar.gz: dea2489cc65034126e3d828d209f53ad3ae45ac66369709f03be0e16daf0284de31d9dc547f0cdadacb6dcce58c6d0abed330b60180f92af62fc0ad60a70ff35
6
+ metadata.gz: f583f0b254bde355d5297d929b1c25a255a001a84455f948e460c6f3b4499f7dfdafe22428ea024eb1e310c7d3117f6c2e7eb61a48f33bd12c850f889dec7857
7
+ data.tar.gz: 135491e90e82efee2e283f864505691e89635b890548f53e795da484cc3feb0988d4aaad4c53c6fc8d49c97759e1dda8d68e5f7486190561d4ccb03f1e69520c
@@ -17,8 +17,8 @@ module Bouncer
17
17
  end
18
18
  end
19
19
 
20
- def service_token
21
- @conn.authorization :Service, ENV['SERVICE_TOKEN']
20
+ def jwt token
21
+ @conn.authorization :JWT, token
22
22
  end
23
23
 
24
24
  def token token
@@ -4,7 +4,7 @@ module Bouncer
4
4
 
5
5
  def self.from_id id
6
6
  client = Bouncer::Client.current
7
- client.service_token
7
+ client.jwt ENV['SERVICE_TOKEN']
8
8
  raw = client.user id
9
9
  from_json raw.body['users'][0]
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module Bouncer
2
- VERSION = "0.2"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -14,7 +14,7 @@ http_interactions:
14
14
  User-Agent:
15
15
  - Faraday v0.9.1
16
16
  Authorization:
17
- - Service a41c1636c6d341c9766ce3e1194d8b1a5f12168abf0c547af2d82c63dff8874f
17
+ - JWT <SERVICE_TOKEN>
18
18
  Accept-Encoding:
19
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
20
  response:
@@ -27,7 +27,7 @@ http_interactions:
27
27
  Connection:
28
28
  - close
29
29
  Date:
30
- - Thu, 19 Feb 2015 22:59:40 GMT
30
+ - Fri, 20 Feb 2015 15:43:23 GMT
31
31
  Status:
32
32
  - 200 OK
33
33
  X-Frame-Options:
@@ -43,14 +43,14 @@ http_interactions:
43
43
  Cache-Control:
44
44
  - max-age=0, private, must-revalidate
45
45
  X-Request-Id:
46
- - d2b2d060-e687-4d32-85ab-c636bc5d0162
46
+ - 1f239099-ad7c-41a7-92a8-966738c9881b
47
47
  X-Runtime:
48
- - '0.156021'
48
+ - '0.012135'
49
49
  Via:
50
50
  - 1.1 vegur
51
51
  body:
52
52
  encoding: UTF-8
53
53
  string: '{"users":[{"id":"960dd380-85db-43c7-b79b-ed3f3c7d4a88","image":"https://secure.gravatar.com/avatar/ebfcbe366c47be18e8d3d6eb13d51d17?d=mm\u0026s=50","phone":"4075120689","email":"kurt@monsieur.co","name":null,"super_admin":true,"confirmed_at":"2000-01-01T18:46:46.786Z"}]}'
54
54
  http_version:
55
- recorded_at: Thu, 19 Feb 2015 22:59:40 GMT
55
+ recorded_at: Fri, 20 Feb 2015 15:43:23 GMT
56
56
  recorded_with: VCR 2.9.3
data/spec/spec_helper.rb CHANGED
@@ -26,6 +26,7 @@ VCR.configure do |c|
26
26
  c.hook_into :webmock
27
27
  c.filter_sensitive_data('<ADMIN_TOKEN>') { ENV['ADMIN_TOKEN'] }
28
28
  c.filter_sensitive_data('<DEVICE_TOKEN>') { ENV['DEVICE_TOKEN'] }
29
+ c.filter_sensitive_data('<SERVICE_TOKEN>') { ENV['SERVICE_TOKEN'] }
29
30
  end
30
31
 
31
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bouncer-client
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kurt Nelson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-19 00:00:00.000000000 Z
11
+ date: 2015-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday