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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/omniauth/oidc/version.rb +1 -1
- data/lib/omniauth/strategies/oidc/verify.rb +4 -5
- data/lib/omniauth/strategies/oidc.rb +3 -3
- data/omniauth_oidc.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 801521d0f3ce8e7cdfa427b09c09689db790784bbacb90f9c1d46e8194db1bb6
|
4
|
+
data.tar.gz: 5a5ddd24e583e982304fca72de602dc8b405b11c98c2d019fbc88fe7058ad48f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8480664bb2f337914f7eefc8aa012d58bc9b67fa66fb0e206d2aef09c0352f9228a4d9212e5a1a36a5689676b01dacc00d888dd5a186fbd6af5a69f69f519174
|
7
|
+
data.tar.gz: 45645700fc002901880944adc41cf1d97ee9d108132c5416718198955b7620203e293938646e225d798e7fd86f028c9bd4f5108aa41f2e3ba822fe6489eef936
|
data/CHANGELOG.md
CHANGED
@@ -30,7 +30,7 @@ module OmniAuth
|
|
30
30
|
private
|
31
31
|
|
32
32
|
def fetch_key
|
33
|
-
@fetch_key ||= parse_jwk_key(::
|
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
|
-
::
|
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
|
-
::
|
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 = ::
|
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 "
|
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
|
115
|
+
# Initialize Oidc Client with options
|
116
116
|
def client
|
117
|
-
@client ||= ::
|
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
|
data/omniauth_oidc.gemspec
CHANGED
@@ -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.
|
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-
|
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:
|
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:
|
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:
|
56
|
+
name: openid_config_parser
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|