omniauth_oidc 0.2.0 → 0.2.1

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
2
  SHA256:
3
- metadata.gz: 219bb4ddd444b494db9e5c1ac72f93e66ef442d3c3243609e62485b186c5c9ff
4
- data.tar.gz: b28c370148e1a6b3245c4f02defa7dde129354d66885807bcf0dd4d262a2a78d
3
+ metadata.gz: 801521d0f3ce8e7cdfa427b09c09689db790784bbacb90f9c1d46e8194db1bb6
4
+ data.tar.gz: 5a5ddd24e583e982304fca72de602dc8b405b11c98c2d019fbc88fe7058ad48f
5
5
  SHA512:
6
- metadata.gz: 8536b7161da3774d5246bb465de5c24d3cb87fd2b164763df1fb01df11e85c87538f314c5a3ada969ae9e43cfa4b0ccbb22c161034ff0b3da70b91d3b93832be
7
- data.tar.gz: 183943792aa52d5fdccb05b77dcd66d65c5d4c1500936e153733692429c51457fb4da61b28b666c0ceebb04e9a925c04a8d17af4ed6033ce8d96b2da2b6dd512
6
+ metadata.gz: 8480664bb2f337914f7eefc8aa012d58bc9b67fa66fb0e206d2aef09c0352f9228a4d9212e5a1a36a5689676b01dacc00d888dd5a186fbd6af5a69f69f519174
7
+ data.tar.gz: 45645700fc002901880944adc41cf1d97ee9d108132c5416718198955b7620203e293938646e225d798e7fd86f028c9bd4f5108aa41f2e3ba822fe6489eef936
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ## [Released]
2
2
 
3
+ ## [0.2.0] - 2024-07-21
4
+ - Update dependencies
5
+
3
6
  ## [0.2.0] - 2024-07-06
4
7
  - Add option to fetch user info or skip it
5
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OmniauthOidc
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
@@ -30,7 +30,7 @@ module OmniAuth
30
30
  private
31
31
 
32
32
  def fetch_key
33
- @fetch_key ||= parse_jwk_key(::OpenIDConnect.http_client.get(config.jwks_uri).body)
33
+ @fetch_key ||= parse_jwk_key(::Oidc.http_client.get(config.jwks_uri).body)
34
34
  end
35
35
 
36
36
  def base64_decoded_jwt_secret
@@ -47,7 +47,6 @@ module OmniAuth
47
47
  nonce: params["nonce"].presence || stored_nonce)
48
48
  end
49
49
 
50
- # Workaround for https://github.com/nov/openid_connect/issues/61
51
50
  def decode_id_token(id_token)
52
51
  decoded = JSON::JWT.decode(id_token, :skip_verification)
53
52
  algorithm = decoded.algorithm.to_sym
@@ -63,7 +62,7 @@ module OmniAuth
63
62
  end
64
63
 
65
64
  decoded.verify!(keyset)
66
- ::OpenIDConnect::ResponseObject::IdToken.new(decoded)
65
+ ::Oidc::ResponseObject::IdToken.new(decoded)
67
66
  rescue JSON::JWK::Set::KidNotFound
68
67
  # Workaround for https://github.com/nov/json-jwt/pull/92#issuecomment-824654949
69
68
  raise if decoded&.header&.key?("kid")
@@ -88,7 +87,7 @@ module OmniAuth
88
87
  end
89
88
 
90
89
  def decode!(id_token, key)
91
- ::OpenIDConnect::ResponseObject::IdToken.decode(id_token, key)
90
+ ::Oidc::ResponseObject::IdToken.decode(id_token, key)
92
91
  end
93
92
 
94
93
  def decode_with_each_key!(id_token, keyset)
@@ -140,7 +139,7 @@ module OmniAuth
140
139
  if access_token.id_token
141
140
  decoded = decode_id_token(access_token.id_token).raw_attributes
142
141
 
143
- @user_info = ::OpenIDConnect::ResponseObject::UserInfo.new(
142
+ @user_info = ::Oidc::ResponseObject::UserInfo.new(
144
143
  access_token.userinfo!.raw_attributes.merge(decoded)
145
144
  )
146
145
  else
@@ -5,7 +5,7 @@ require "timeout"
5
5
  require "net/http"
6
6
  require "open-uri"
7
7
  require "omniauth"
8
- require "openid_connect"
8
+ require "oidc"
9
9
  require "openid_config_parser"
10
10
  require "forwardable"
11
11
  require "httparty"
@@ -112,9 +112,9 @@ module OmniAuth
112
112
  }
113
113
  end
114
114
 
115
- # Initialize OpenIDConnect Client with options
115
+ # Initialize Oidc Client with options
116
116
  def client
117
- @client ||= ::OpenIDConnect::Client.new(client_options)
117
+ @client ||= ::Oidc::Client.new(client_options)
118
118
  end
119
119
 
120
120
  # Config is build from the json response from the OIDC config endpoint
@@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
33
33
 
34
34
  # Uncomment to register a new dependency of your gem
35
35
  spec.add_dependency "httparty"
36
+ spec.add_dependency "oidc"
36
37
  spec.add_dependency "omniauth"
37
38
  spec.add_dependency "openid_config_parser"
38
- spec.add_dependency "openid_connect"
39
39
 
40
40
  # For more information and examples about making a new gem, check out our
41
41
  # guide at: https://bundler.io/guides/creating_gem.html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth_oidc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suleyman Musayev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-06 00:00:00.000000000 Z
11
+ date: 2024-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: omniauth
28
+ name: oidc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: openid_config_parser
42
+ name: omniauth
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: openid_connect
56
+ name: openid_config_parser
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="