pusher-chatkit-server 0.6.1 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chatkit/client.rb +12 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69e76c8a5b631d9a971a122b3be73116d835d07d31455828d79c6b0577d4b45a
|
4
|
+
data.tar.gz: 13ab078195db831f2977fb9c290fccc5f3c5d54706060b84e30a6358aa0bade4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db1b73f72c3faa43dbea7f6da27403b3e9fa96ff083d7deb0bb741370a2d360834b4d517d9c3963e9c404ffc5eff6f06a12230d5ede9de15866307a989734a69
|
7
|
+
data.tar.gz: be9b4093375e54db8d51ed12b0430e47718119a6a1dd7a061a67d6b3ff43e989d04a9bfed6d3b2a7e8cadf1aab739130fd74e63809dcab5f294e100c69d03356
|
data/lib/chatkit/client.rb
CHANGED
@@ -20,14 +20,14 @@ module Chatkit
|
|
20
20
|
client: options[:client]
|
21
21
|
}
|
22
22
|
|
23
|
-
@api_instance =
|
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 =
|
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(
|
39
|
-
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 0.8.0
|
27
27
|
description:
|
28
28
|
email: support@pusher.com
|
29
29
|
executables: []
|