json-jwt 1.10.2 → 1.11.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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/json/jwe.rb +1 -1
  4. data/lib/json/jws.rb +2 -2
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9722326506beeb2d6480213a55bd199edaa160b87cbda1db58c3612f22b5dca
4
- data.tar.gz: 1e8aad65bc72f0f4ea4f63de47b74169c43a77464dc13e4325e932f3829be86f
3
+ metadata.gz: 87ba6f4c95c228a09cc0867fad5dd1caba1a106a8c74624b8a962aeead5eacb4
4
+ data.tar.gz: 7de48d6108afac993872d87fa5444668cc88903a5c621d3b3d95dfe27168523c
5
5
  SHA512:
6
- metadata.gz: 250e330df6993928d4afa477634182fed67363c545e79eb74939aae72844183e7780d63c2b375f3b8ec91475123924833792cbfb5afc630cda93a1f2dd12bb99
7
- data.tar.gz: ce81d63980928addf7bece7dc1b24cbc9265e2231aead3880be85b690d73f058563e81beea383d1f3bd7cc6a84ee9a9b6438b67edd1922b185a7dca6b9239864
6
+ metadata.gz: f7f8d35bedbc9e09e284aeebcff276c6c4380cd037cb7ec44d08cdcd3d592c1fae0ef541e837ecdb13593d1719af5879910f674eda5a659249f8eab2720d0e75
7
+ data.tar.gz: ae640c9d0326593ec91cef8ff7eba66a44eeacb69f53058f1eebe8625a9359a921dae601cdaa0651438e10ab8237635cb2bfbeee9b6651200ce375b4c6d34213
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.10.2
1
+ 1.11.0
@@ -254,7 +254,7 @@ module JSON
254
254
  raise InvalidFormat.new("Invalid JWE Format. JWE should include #{NUM_OF_SEGMENTS} segments.")
255
255
  end
256
256
  jwe = new
257
- _header_json_, jwe.jwe_encrypted_key, jwe.iv, jwe.cipher_text, jwe.authentication_tag = input.split('.').collect do |segment|
257
+ _header_json_, jwe.jwe_encrypted_key, jwe.iv, jwe.cipher_text, jwe.authentication_tag = input.split('.', NUM_OF_SEGMENTS).collect do |segment|
258
258
  begin
259
259
  Base64.urlsafe_decode64 segment
260
260
  rescue ArgumentError
@@ -179,7 +179,7 @@ module JSON
179
179
  unless input.count('.') + 1 == NUM_OF_SEGMENTS
180
180
  raise InvalidFormat.new("Invalid JWS Format. JWS should include #{NUM_OF_SEGMENTS} segments.")
181
181
  end
182
- header, claims, signature = input.split('.', JWS::NUM_OF_SEGMENTS).collect do |segment|
182
+ header, claims, signature = input.split('.', NUM_OF_SEGMENTS).collect do |segment|
183
183
  Base64.urlsafe_decode64 segment.to_s
184
184
  end
185
185
  header = JSON.parse(header).with_indifferent_access
@@ -191,7 +191,7 @@ module JSON
191
191
  jws = new claims
192
192
  jws.header = header
193
193
  jws.signature = signature
194
- jws.signature_base_string = input.split('.')[0, JWS::NUM_OF_SEGMENTS - 1].join('.')
194
+ jws.signature_base_string = input.split('.')[0, NUM_OF_SEGMENTS - 1].join('.')
195
195
  jws.verify! public_key_or_secret, algorithms unless public_key_or_secret == :skip_verification
196
196
  jws
197
197
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.10.2
4
+ version: 1.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-27 00:00:00.000000000 Z
11
+ date: 2019-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport