gitlab-omniauth-openid-connect 0.4.0 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba1a1f85a4f4302aa277a818b0c6f1a19f0aa09bd10815a6cc339cbc8e19b630
4
- data.tar.gz: 91ded3eb14016b4ee15823b34e8c2b6960e7bafbcb5812596722c469b101e91f
3
+ metadata.gz: cee603f7fbf49710ecee6e6953ca205feb9620c25dc9d865d7b44dda22a7b0dc
4
+ data.tar.gz: 18ecc1ef7a21e86a2e2554d10d3a95dc2c9dcd26cf0a66509f931a62ce0b4e7d
5
5
  SHA512:
6
- metadata.gz: 7f89ac2119d55244bec0c7a5f1b155b082e2e8c8d9f66ff54dbda173e167872847898d53b0d6cf6eb5d670c3d262ebfe1a0632bc25cfaf5ef178b586cae62de8
7
- data.tar.gz: e29da0221ea0895ce5951239ffc347669ceff53b8574a9e463ee00392c5aec032d61ea9544b0f4ee47395e440c3c2ddde0ed42ecfe54daa78e4cb204d1c8f2d9
6
+ metadata.gz: 2959c9ee30ca4e8c84b57f578d142744fea140c94c60daafcefb83c6aabfb707610f47c9f1ae2186033bf98d992e799614c24760393a63ce03473a1fb4301e77
7
+ data.tar.gz: 1fd6fb3c3d009d011ca4fd595756ea6d46d34d7ad8a0fc93d4921684f0e4cec92b1e20a4ecc1d49beaa28eff6731e02df616e2f7f99e3ec4419273a179aeb139
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # v0.5.0 (05.07.2021)
2
+
3
+ - [Add email_verified field to info dict](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/7)
4
+ - [Simplify error handling for decoding individual keys](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/6)
5
+ - [Always convert client_signing_alg to be a symbol](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/5)
6
+
1
7
  # v0.4.0 (04.23.2021)
2
8
 
3
9
  - [Fetch key from JWKS URI if available](https://gitlab.com/gitlab-org/gitlab-omniauth-openid-connect/-/merge_requests/3)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module OpenIDConnect
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
@@ -65,6 +65,7 @@ module OmniAuth
65
65
  {
66
66
  name: user_info.name,
67
67
  email: user_info.email,
68
+ email_verified: user_info.email_verified,
68
69
  nickname: user_info.preferred_username,
69
70
  first_name: user_info.given_name,
70
71
  last_name: user_info.family_name,
@@ -259,7 +260,7 @@ module OmniAuth
259
260
  public_key.each do |key|
260
261
  begin
261
262
  decoded = decode!(id_token, key)
262
- rescue JSON::JWK::Set::KidNotFound, JSON::JWS::VerificationFailed
263
+ rescue JSON::JWS::VerificationFailed
263
264
  next
264
265
  end
265
266
 
@@ -304,7 +305,7 @@ module OmniAuth
304
305
 
305
306
  def key_or_secret
306
307
  @key_or_secret ||=
307
- case options.client_signing_alg
308
+ case options.client_signing_alg&.to_sym
308
309
  when :HS256, :HS384, :HS512
309
310
  client_options.secret
310
311
  when :RS256, :RS384, :RS512
@@ -477,6 +477,7 @@ module OmniAuth
477
477
  info = strategy.info
478
478
  assert_equal user_info.name, info[:name]
479
479
  assert_equal user_info.email, info[:email]
480
+ assert_equal user_info.email_verified, info[:email_verified]
480
481
  assert_equal user_info.preferred_username, info[:nickname]
481
482
  assert_equal user_info.given_name, info[:first_name]
482
483
  assert_equal user_info.family_name, info[:last_name]
@@ -32,6 +32,7 @@ class StrategyTestCase < MiniTest::Test
32
32
  sub: SecureRandom.hex(16),
33
33
  name: Faker::Name.name,
34
34
  email: Faker::Internet.email,
35
+ email_verified: Faker::Boolean.boolean,
35
36
  nickname: Faker::Name.first_name,
36
37
  preferred_username: Faker::Internet.user_name,
37
38
  given_name: Faker::Name.first_name,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-omniauth-openid-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bohn
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-04-24 00:00:00.000000000 Z
12
+ date: 2021-05-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable