webpush 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/webpush/request.rb +5 -1
- data/lib/webpush/version.rb +1 -1
- data/webpush.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd72ccff15bfca2e3f28ae66b4e48e1898224955
|
4
|
+
data.tar.gz: 872df71aebcf0dbfd1c655403dcbd7dc053b2de8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 736595fe6e9304843ca9f22404c4e3ed890442fcbef774089196cc0acf12d189962461c8befafd1343fc789f701d53e64e719a8628bbee6972838f8fad2c4455
|
7
|
+
data.tar.gz: 6e0f0eab8a4fb5709a5502ff574e53153273f53f6479233f3ccdb53cdcfd98130a0ceeceeb6e3fc826858f22cb0d3f87d048c3d24c0563c6f142135290a48b93
|
data/lib/webpush/request.rb
CHANGED
@@ -62,7 +62,7 @@ module Webpush
|
|
62
62
|
|
63
63
|
def build_vapid_headers
|
64
64
|
vapid_key = VapidKey.from_keys(vapid_public_key, vapid_private_key)
|
65
|
-
jwt = JWT.encode(jwt_payload, vapid_key.curve, 'ES256')
|
65
|
+
jwt = JWT.encode(jwt_payload, vapid_key.curve, 'ES256', jwt_header_fields)
|
66
66
|
p256ecdsa = vapid_key.public_key_for_push_header
|
67
67
|
|
68
68
|
{
|
@@ -101,6 +101,10 @@ module Webpush
|
|
101
101
|
}
|
102
102
|
end
|
103
103
|
|
104
|
+
def jwt_header_fields
|
105
|
+
{ 'typ' => 'JWT' }
|
106
|
+
end
|
107
|
+
|
104
108
|
def audience
|
105
109
|
uri.scheme + "://" + uri.host
|
106
110
|
end
|
data/lib/webpush/version.rb
CHANGED
data/webpush.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_dependency "hkdf", "~> 0.2"
|
21
|
-
spec.add_dependency "jwt"
|
21
|
+
spec.add_dependency "jwt", "~> 2.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
24
|
spec.add_development_dependency 'pry'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webpush
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zaru@sakuraba
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hkdf
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: jwt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubyforge_project:
|
169
|
-
rubygems_version: 2.
|
169
|
+
rubygems_version: 2.6.13
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Encryption Utilities for Web Push payload.
|