pusher-platform 0.8.0 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pusher-platform/authenticator.rb +1 -0
- data/lib/pusher-platform/base_client.rb +6 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b37bcb8a500e8314abca4a507bee5eabc9644544101a00c1d706363ac6dfbb7
|
4
|
+
data.tar.gz: bdf4363753bbe9307ab8f16acec395460351e59f64b38ce683d0ffa24f575eb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00da9bfd13ca38391540ac1138bfcd255f14935b9c7fc0c2bf53912cb14dac2d758ad89e7f11b39f76b3a10da1002ff1034e11182477208a77ba33c536a576ea
|
7
|
+
data.tar.gz: a013a69a9adf571c90a232f5d48c0125a016380421fa839d66215ffe963ae04fc69a747a1d2f63166408d3d5786d0d5a54971172d08f63ab8e157223a5f55308
|
@@ -55,6 +55,7 @@ module PusherPlatform
|
|
55
55
|
|
56
56
|
claims.merge!({ sub: options[:user_id] }) unless options[:user_id].nil?
|
57
57
|
claims.merge!({ su: true }) if options[:su]
|
58
|
+
claims.merge!(options[:service_claims]) if options[:service_claims]
|
58
59
|
|
59
60
|
{
|
60
61
|
token: JWT.encode(claims, @key_secret, 'HS256'),
|
@@ -52,7 +52,12 @@ module PusherPlatform
|
|
52
52
|
rescue
|
53
53
|
response.body
|
54
54
|
end
|
55
|
-
|
55
|
+
error_res_opts = {
|
56
|
+
status: response.status,
|
57
|
+
headers: response.headers,
|
58
|
+
error_description: error_description
|
59
|
+
}
|
60
|
+
raise ErrorResponse.new(error_res_opts)
|
56
61
|
else
|
57
62
|
raise "unsupported response code: #{response.status}"
|
58
63
|
end
|
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.8.
|
4
|
+
version: 0.8.1
|
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-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -44,20 +44,6 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 1.5.6
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: rack
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - ">="
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '1.0'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - ">="
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '1.0'
|
61
47
|
description:
|
62
48
|
email: support@pusher.com
|
63
49
|
executables: []
|