json-jwt 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of json-jwt might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a98ee69ad6ede8d52865b72096ceb2992eaa006
4
- data.tar.gz: 15059e8c7cea0d1bb9838d920312c92f48102465
3
+ metadata.gz: 7649be617fc501060e8befd700c60cdb8ce8a12d
4
+ data.tar.gz: 9651a7ce62ff0b6f6d2871d7efca3c59d643dce4
5
5
  SHA512:
6
- metadata.gz: 578d7cbb63227d519b499f0fafab8ce574c8122c324ffd77a1c9b4f37ba1a985134ec1fc9cfad577db44ac98749b92b650990aa66e1b321a8a8cf5a2db668dea
7
- data.tar.gz: ad5947e84fa804e94361dbf30b4dcd0e4a5b962d3b4485d3052242d3fb971517b78b26e5cabcf5f286bb1463afe45583f106eb38a08dc920bd8cdc0d2129e6ad
6
+ metadata.gz: c42db1a5ec52bd3ed4c9ef99c96eeffa03c9f2eef67390ad95afbf9d7b6a126d8dacc58ec6f09a50acd65b8f775a5d4829754ef94455f8a864bc353397b375d3
7
+ data.tar.gz: 6f73a187ff937ed434af26029ba8af42d6b6a0a523171c18006bd2db53b29128ff81eb6bc8517e35d973783421a88cc946ad2bc6756aa97e88a62eeee27e7ef9
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.4
1
+ 0.5.5
data/lib/json/jwk.rb CHANGED
@@ -63,6 +63,7 @@ module JSON
63
63
 
64
64
  class << self
65
65
  def decode(jwk)
66
+ jwk = jwk.with_indifferent_access
66
67
  case jwk[:kty].to_s
67
68
  when 'RSA'
68
69
  e = OpenSSL::BN.new UrlSafeBase64.decode64(jwk[:e]), 2
data/lib/json/jwk/set.rb CHANGED
@@ -10,7 +10,7 @@ module JSON
10
10
 
11
11
  def as_json(options = {})
12
12
  # NOTE: Array.new wrapper is requied to avoid CircularReferenceError
13
- { :keys => Array.new(self) }
13
+ {:keys => Array.new(self)}
14
14
  end
15
15
  end
16
16
  end
@@ -109,6 +109,14 @@ NrqoxoakrPo1NI1u+ET8oWGmnjB/nJFAPwIDAQAB
109
109
 
110
110
  it { should be_instance_of OpenSSL::PKey::RSA }
111
111
  its(:to_pem) { should == pem }
112
+
113
+ it 'should support string keys' do
114
+ JSON::JWK.decode(
115
+ 'kty' => 'RSA',
116
+ 'n' => n,
117
+ 'e' => e
118
+ ).should be_instance_of OpenSSL::PKey::RSA
119
+ end
112
120
  end
113
121
 
114
122
  context 'when ECDSA' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-jwt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake