openid_connect 1.1.5 → 1.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 04c70bdd6735aa34846dbe2ced83a63131cf8771
4
- data.tar.gz: 1a6729f00ad9b2cfd5c66ba7536fddaec08af97c
2
+ SHA256:
3
+ metadata.gz: 9e45b59e9c8ee8497e0abfc6d4bef24909ebe88e847d2cb6741a84294263a8a1
4
+ data.tar.gz: 64adaed69ac28e6e722562d63e5cd1f94a29a89f78a1faecf3ab8821a3768b2e
5
5
  SHA512:
6
- metadata.gz: aaf18081e97f686acbe272f1a2658a7cfef3b79c37a13f3d85a029bb232fe9f687ef46d07b21933364ebff5eafe72d09a8cb240e91ff7f8be0c4f175cfc12081
7
- data.tar.gz: 714018e8f50cf227ecc778f2c66d7c39834ef12f746c1f3cac62c3ba37ecd03766a0a18f1871d7664017a92d20da6ada71cf904bfb74d0dee159a3106c664491
6
+ metadata.gz: 78b735b49e830c6fe4a400ecf33d13bfcd6565bc502313cb5b0496cd80f226133ce989909399e2da1f2f2191039ba47060d89def1517cb832eb613a7bcef464f
7
+ data.tar.gz: 30771e6665ecac2029982510f54b3ecae6bf6b030d6624fc7d3d9e115b657cffe890d2d9aaaf6ccde1fed9ecd8fe54105e6f4af3697f8d48a194f51f542341ea
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.5
1
+ 1.1.6
@@ -8,6 +8,7 @@ require 'validate_url'
8
8
  require 'validate_email'
9
9
  require 'attr_required'
10
10
  require 'attr_optional'
11
+ require 'json/jwt'
11
12
  require 'rack/oauth2'
12
13
  require 'rack/oauth2/server/authorize/error_with_connect_ext'
13
14
  require 'rack/oauth2/server/authorize/request_with_connect_params'
@@ -1,5 +1,3 @@
1
- require 'json/jwt'
2
-
3
1
  module OpenIDConnect
4
2
  class ResponseObject
5
3
  class IdToken < ConnectObject
@@ -58,7 +56,7 @@ module OpenIDConnect
58
56
 
59
57
  def left_half_hash_of(string, hash_length)
60
58
  digest = OpenSSL::Digest.new("SHA#{hash_length}").digest string
61
- UrlSafeBase64.encode64 digest[0, hash_length / (2 * 8)]
59
+ Base64.urlsafe_encode64 digest[0, hash_length / (2 * 8)], padding: false
62
60
  end
63
61
 
64
62
  class << self
@@ -157,7 +157,7 @@ describe OpenIDConnect::ResponseObject::IdToken do
157
157
  t = id_token.to_jwt private_key do |t|
158
158
  t.header[:x5u] = "http://server.example.com/x5u"
159
159
  end
160
- h = UrlSafeBase64.decode64 t.split('.').first
160
+ h = Base64.urlsafe_decode64 t.split('.').first
161
161
  h.should include 'x5u'
162
162
  end
163
163
  end
@@ -169,8 +169,9 @@ describe OpenIDConnect::ResponseObject::IdToken do
169
169
  jwt = JSON::JWT.decode t, public_key
170
170
  jwt.should include :at_hash
171
171
  jwt.should_not include :c_hash
172
- jwt[:at_hash].should == UrlSafeBase64.encode64(
173
- OpenSSL::Digest::SHA256.digest('access_token')[0, 128 / 8]
172
+ jwt[:at_hash].should == Base64.urlsafe_encode64(
173
+ OpenSSL::Digest::SHA256.digest('access_token')[0, 128 / 8],
174
+ padding: false
174
175
  )
175
176
  end
176
177
  end
@@ -193,8 +194,9 @@ describe OpenIDConnect::ResponseObject::IdToken do
193
194
  jwt = JSON::JWT.decode t, public_key
194
195
  jwt.should_not include :at_hash
195
196
  jwt.should include :c_hash
196
- jwt[:c_hash].should == UrlSafeBase64.encode64(
197
- OpenSSL::Digest::SHA256.digest('authorization_code')[0, 128 / 8]
197
+ jwt[:c_hash].should == Base64.urlsafe_encode64(
198
+ OpenSSL::Digest::SHA256.digest('authorization_code')[0, 128 / 8],
199
+ padding: false
198
200
  )
199
201
  end
200
202
  end
@@ -209,11 +211,13 @@ describe OpenIDConnect::ResponseObject::IdToken do
209
211
  jwt = JSON::JWT.decode t, public_key
210
212
  jwt.should include :at_hash
211
213
  jwt.should include :c_hash
212
- jwt[:at_hash].should == UrlSafeBase64.encode64(
213
- OpenSSL::Digest::SHA256.digest('access_token')[0, 128 / 8]
214
+ jwt[:at_hash].should == Base64.urlsafe_encode64(
215
+ OpenSSL::Digest::SHA256.digest('access_token')[0, 128 / 8],
216
+ padding: false
214
217
  )
215
- jwt[:c_hash].should == UrlSafeBase64.encode64(
216
- OpenSSL::Digest::SHA256.digest('authorization_code')[0, 128 / 8]
218
+ jwt[:c_hash].should == Base64.urlsafe_encode64(
219
+ OpenSSL::Digest::SHA256.digest('authorization_code')[0, 128 / 8],
220
+ padding: false
217
221
  )
218
222
  end
219
223
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openid_connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - nov matake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tzinfo
@@ -320,7 +320,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
320
  version: '0'
321
321
  requirements: []
322
322
  rubyforge_project:
323
- rubygems_version: 2.6.13
323
+ rubygems_version: 2.7.3
324
324
  signing_key:
325
325
  specification_version: 4
326
326
  summary: OpenID Connect Server & Client Library