pusher-platform 0.2.0 → 0.3.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
  SHA1:
3
- metadata.gz: 32291000abdb919cc500b2056087a82cbfaa89ff
4
- data.tar.gz: 4af86b24dd738937da180c700de4f9fa9c6b57b7
3
+ metadata.gz: 9c2d621a6b9915f71967e78ca6ad32130fc88049
4
+ data.tar.gz: de6d68d17c1df236de5b3cf67f6f3659334e8a27
5
5
  SHA512:
6
- metadata.gz: 8c29aac90982c3b4e4785df785a7a96a50749bfee6d74358ab487b18349afc0d9dd776e6913638fd4db396ee56a77a987cbbf6bd7becf548872ee817ea21d3ff
7
- data.tar.gz: ff4514658c6d3adbb70b02e260857c8468423cb97def7d7b6bb5797e61cef7e7ebd6a4ee795ed173a25cc5b7a01049eb1443a3773c5d23b15eba436680e51cb7
6
+ metadata.gz: 0c8dd63f3a5cc649125cd8cab1cca0e3262b003cfcd5ccdc441f027483384cb1838d4fbb2ba219ca67fc6d7523989f1ee0ed292a431a0868d25b86f937fa0dfb
7
+ data.tar.gz: c3dcf874cfe172b2f27983fc6249d6abf5e68d88007623b1b070540bf9ad929da2afb2a0a7987dac22584787959b9419dc3cb3714e8b010178741b20df8d6a49
@@ -33,14 +33,6 @@ module Pusher
33
33
  @client.request(options)
34
34
  end
35
35
 
36
- def config_request(options)
37
- options = scope_request_options("config/apps", options)
38
- if options[:jwt].nil?
39
- options = options.merge({ jwt: generate_superuser_jwt() })
40
- end
41
- @client.request(options)
42
- end
43
-
44
36
  def authenticate(request, options)
45
37
  @authenticator.authenticate(request, options)
46
38
  end
@@ -58,7 +50,7 @@ module Pusher
58
50
  now = Time.now.utc.to_i
59
51
  claims = {
60
52
  app: @app_id,
61
- iss: @app_key_id,
53
+ iss: "api_keys/#{@app_key_id}",
62
54
  su: true,
63
55
  iat: now - 30, # some leeway for the server
64
56
  exp: now + 60*5, # 5 minutes should be enough for a single request
@@ -42,7 +42,7 @@ module Pusher
42
42
  def authenticate_with_refresh_token(old_refresh_jwt, options)
43
43
  old_refresh_token = begin
44
44
  JWT.decode(old_refresh_jwt, @app_key_secret, true, {
45
- iss: @app_key_id,
45
+ iss: "api_keys/#{@app_key_id}",
46
46
  verify_iss: true,
47
47
  leeway: 30,
48
48
  }).first
@@ -103,7 +103,7 @@ module Pusher
103
103
 
104
104
  claims = {
105
105
  app: @app_id,
106
- iss: @app_key_id,
106
+ iss: "api_keys/#{@app_key_id}",
107
107
  iat: now - TOKEN_LEEWAY,
108
108
  exp: now + TOKEN_EXPIRY + TOKEN_LEEWAY,
109
109
  sub: options[:user_id],
@@ -117,7 +117,7 @@ module Pusher
117
117
 
118
118
  claims = {
119
119
  app: @app_id,
120
- iss: @app_key_id,
120
+ iss: "api_keys/#{@app_key_id}",
121
121
  iat: now - TOKEN_LEEWAY,
122
122
  refresh: true,
123
123
  sub: options[:user_id],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-platform
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pusher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-28 00:00:00.000000000 Z
11
+ date: 2017-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon