omniauth_openid_connect 0.7.0 → 0.7.1
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/omniauth/openid_connect/version.rb +1 -1
- data/lib/omniauth/strategies/openid_connect.rb +1 -1
- data/omniauth_openid_connect.gemspec +1 -0
- data/test/lib/omniauth/strategies/openid_connect_test.rb +11 -21
- data/test/test_helper.rb +1 -0
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c2be6aafa448af62c29c2183954e27a374018d270ac09137b04eb6b5e0aaeba
|
4
|
+
data.tar.gz: 3254e1780018a43ee507d7a43ad310dcbec9abe4c0de20ba7e93f78f22c61067
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 00060df4350aad1ed5a402e24562a4e774ef43fcba0cf501286e8d8f25a6d3d35a15b7c3f61541adb316b213fea64bab41ab3dea2a53eebaf9a84f427ea11a5e
|
7
|
+
data.tar.gz: 9bdfc6dae8d63c6831611514e02c5108a5f3e417a2409f0e859a1c5262eb0d2939a476d4b70f8582c70bf5f6084e3f84301e9c9cbe7441691aa2b0e076dfc783
|
data/CHANGELOG.md
CHANGED
@@ -39,4 +39,5 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_development_dependency 'rubocop', '~> 1.12'
|
40
40
|
spec.add_development_dependency 'simplecov', '~> 0.21'
|
41
41
|
spec.add_development_dependency 'simplecov-lcov', '~> 0.8'
|
42
|
+
spec.add_development_dependency 'webmock', '~> 3.18'
|
42
43
|
end
|
@@ -520,14 +520,10 @@ module OmniAuth
|
|
520
520
|
strategy.options.client_options.jwks_uri = 'https://jwks.example.com'
|
521
521
|
strategy.options.response_type = 'id_token'
|
522
522
|
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
stubs.get(strategy.options.client_options.jwks_uri) { [200, {}, jwks.to_json] }
|
528
|
-
end
|
529
|
-
end
|
530
|
-
)
|
523
|
+
stub_request(:get, strategy.options.client_options.jwks_uri).to_return(
|
524
|
+
body: jwks.to_json,
|
525
|
+
headers: { 'Content-Type' => 'application/json' }
|
526
|
+
)
|
531
527
|
|
532
528
|
strategy.unstub(:user_info)
|
533
529
|
access_token = stub('OpenIDConnect::AccessToken')
|
@@ -812,19 +808,13 @@ module OmniAuth
|
|
812
808
|
id_token.stubs(:verify!).with(issuer: strategy.options.issuer, client_id: @identifier, nonce: nonce).returns(true)
|
813
809
|
::OpenIDConnect::ResponseObject::IdToken.stubs(:decode).returns(id_token)
|
814
810
|
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
) do
|
823
|
-
[200, {}, json_response]
|
824
|
-
end
|
825
|
-
end
|
826
|
-
end
|
827
|
-
)
|
811
|
+
url = "#{ opts.scheme }://#{ opts.host }:#{ opts.port }#{ opts.token_endpoint }"
|
812
|
+
body = { scope: 'openid', grant_type: 'client_credentials', client_id: @identifier, client_secret: @secret }
|
813
|
+
|
814
|
+
stub_request(:post, url).with(body: body).to_return(
|
815
|
+
body: json_response.to_json,
|
816
|
+
headers: { 'Content-Type' => 'application/json' }
|
817
|
+
)
|
828
818
|
|
829
819
|
assert(strategy.send(:access_token))
|
830
820
|
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth_openid_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
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: 2023-04-
|
12
|
+
date: 2023-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -185,6 +185,20 @@ dependencies:
|
|
185
185
|
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
187
|
version: '0.8'
|
188
|
+
- !ruby/object:Gem::Dependency
|
189
|
+
name: webmock
|
190
|
+
requirement: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '3.18'
|
195
|
+
type: :development
|
196
|
+
prerelease: false
|
197
|
+
version_requirements: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '3.18'
|
188
202
|
description: OpenID Connect Strategy for OmniAuth.
|
189
203
|
email:
|
190
204
|
- jjbohn@gmail.com
|
@@ -219,8 +233,8 @@ licenses:
|
|
219
233
|
metadata:
|
220
234
|
bug_tracker_uri: https://github.com/m0n9oose/omniauth_openid_connect/issues
|
221
235
|
changelog_uri: https://github.com/m0n9oose/omniauth_openid_connect/releases
|
222
|
-
documentation_uri: https://github.com/m0n9oose/omniauth_openid_connect/tree/v0.7.
|
223
|
-
source_code_uri: https://github.com/m0n9oose/omniauth_openid_connect/tree/v0.7.
|
236
|
+
documentation_uri: https://github.com/m0n9oose/omniauth_openid_connect/tree/v0.7.1#readme
|
237
|
+
source_code_uri: https://github.com/m0n9oose/omniauth_openid_connect/tree/v0.7.1
|
224
238
|
rubygems_mfa_required: 'true'
|
225
239
|
post_install_message:
|
226
240
|
rdoc_options: []
|