pusher-chatkit-server 0.6.1 → 0.7.0

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/chatkit/client.rb +12 -4
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59e47ed4cd89e6dfd5755a4193f324eb59c43f9c68a8922c109954941a2b4611
4
- data.tar.gz: 70aadd96a6b13adc7aefe57360362ed70241ed271782bb3197bc62ae0fb7b987
3
+ metadata.gz: 69e76c8a5b631d9a971a122b3be73116d835d07d31455828d79c6b0577d4b45a
4
+ data.tar.gz: 13ab078195db831f2977fb9c290fccc5f3c5d54706060b84e30a6358aa0bade4
5
5
  SHA512:
6
- metadata.gz: 81a81812928530bce06f2d00e57b98e560c2af030788c1e89a5b2184940a9275f924f95bac2907e4fa0ed848cccc4682631c80e3adc5da1ac388d76942162906
7
- data.tar.gz: 5f09c62595d30ee542b0f39714b968308ac31c4c467ea423ea7710da7a4b27a3953bdd44e8c62970348cbaa57e47ee305618803ec0ff27100d4658ed812b0dd6
6
+ metadata.gz: db1b73f72c3faa43dbea7f6da27403b3e9fa96ff083d7deb0bb741370a2d360834b4d517d9c3963e9c404ffc5eff6f06a12230d5ede9de15866307a989734a69
7
+ data.tar.gz: be9b4093375e54db8d51ed12b0430e47718119a6a1dd7a061a67d6b3ff43e989d04a9bfed6d3b2a7e8cadf1aab739130fd74e63809dcab5f294e100c69d03356
@@ -20,14 +20,14 @@ module Chatkit
20
20
  client: options[:client]
21
21
  }
22
22
 
23
- @api_instance = Pusher::Instance.new(
23
+ @api_instance = PusherPlatform::Instance.new(
24
24
  base_options.merge!({
25
25
  service_name: 'chatkit',
26
26
  service_version: 'v1'
27
27
  })
28
28
  )
29
29
 
30
- @authorizer_instance = Pusher::Instance.new(
30
+ @authorizer_instance = PusherPlatform::Instance.new(
31
31
  base_options.merge!({
32
32
  service_name: 'chatkit_authorizer',
33
33
  service_version: 'v1'
@@ -35,8 +35,16 @@ module Chatkit
35
35
  )
36
36
  end
37
37
 
38
- def authenticate(request, options)
39
- @api_instance.authenticate(request, options)
38
+ def authenticate(options)
39
+ user_id = options['user_id'] || options[:user_id]
40
+ auth_payload = options['auth_payload'] || options[:auth_payload] || {
41
+ grant_type: 'client_credentials'
42
+ }
43
+ @api_instance.authenticate(auth_payload, { user_id: user_id })
44
+ end
45
+
46
+ def authenticate_with_request(request, options)
47
+ @api_instance.authenticate_with_request(request, options)
40
48
  end
41
49
 
42
50
  def generate_access_token(options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pusher-chatkit-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pusher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-26 00:00:00.000000000 Z
11
+ date: 2018-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pusher-platform
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.6.0
19
+ version: 0.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.6.0
26
+ version: 0.8.0
27
27
  description:
28
28
  email: support@pusher.com
29
29
  executables: []