test_openid_connect 0.1.7 → 0.1.11
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/lib/omniauth/strategies/test_openid_connect.rb +30 -24
- data/test_openid_connect.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c298e7c4c5f7cfa382fa4e9a5bf7654d91037d9b9c4b9094368faec12f9b76e
|
4
|
+
data.tar.gz: 67afbbc14da04967034572ee9f301691bc5c1543ae81be018d5c0eec5624f6e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a75faa031d9eaa20d5408c91d143f92960728532c53205d4a4cbede647a22cae3f04fc441020b011d0b6155cfa3bcaf7cd86bdbf7169b4a9daebbf64b5ab97c
|
7
|
+
data.tar.gz: a926e44a9bd047441e16fe372c938a4066946316b548fbbe63f862626933b6efc7b4011b5452577471f5452453178fc6fea540a11480a4e22398a077a653ea73
|
@@ -35,7 +35,9 @@ module ::OmniAuth
|
|
35
35
|
# verbose_log("Fetching discovery document from #{options[:client_options][:discovery_document]}")
|
36
36
|
discovery_document = client.request(:get, options[:client_options][:discovery_document], parse: :json).parsed
|
37
37
|
# verbose_log("Discovery document loaded\n\n#{discovery_document.to_yaml}")
|
38
|
-
|
38
|
+
puts "****************"
|
39
|
+
puts discovery_document
|
40
|
+
puts "****************"
|
39
41
|
discovery_params = {
|
40
42
|
authorize_url: "authorization_endpoint",
|
41
43
|
token_url: "token_endpoint",
|
@@ -54,7 +56,7 @@ module ::OmniAuth
|
|
54
56
|
|
55
57
|
def request_phase
|
56
58
|
begin
|
57
|
-
discover!
|
59
|
+
discover!
|
58
60
|
rescue ::OmniAuth::OpenIDConnect::DiscoveryError => e
|
59
61
|
fail!(:openid_connect_discovery_error, e)
|
60
62
|
end
|
@@ -62,6 +64,10 @@ module ::OmniAuth
|
|
62
64
|
super
|
63
65
|
end
|
64
66
|
|
67
|
+
# def request_phase
|
68
|
+
# redirect client.auth_code.authorize_url({:redirect_uri => callback_url}.merge(options.authorize_params))
|
69
|
+
# end
|
70
|
+
|
65
71
|
def authorize_params
|
66
72
|
super.tap do |params|
|
67
73
|
options[:passthrough_authorize_options].each do |k|
|
@@ -86,28 +92,28 @@ module ::OmniAuth
|
|
86
92
|
super.merge(params)
|
87
93
|
end
|
88
94
|
|
89
|
-
def callback_phase
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
end
|
95
|
+
# def callback_phase
|
96
|
+
# if request.params["error"] && request.params["error_description"]
|
97
|
+
# # verbose_log("Error handled, redirecting\n\n#{response.to_yaml}")
|
98
|
+
# return redirect(response)
|
99
|
+
# end
|
100
|
+
|
101
|
+
# begin
|
102
|
+
# discover! if options[:discovery]
|
103
|
+
|
104
|
+
# oauth2_callback_phase = super
|
105
|
+
# return oauth2_callback_phase if env['omniauth.error']
|
106
|
+
|
107
|
+
# if id_token_info["nonce"].nil? || id_token_info["nonce"].empty? || id_token_info["nonce"] != session.delete("omniauth.nonce")
|
108
|
+
# return fail!(:csrf_detected, CallbackError.new(:csrf_detected, "CSRF detected"))
|
109
|
+
# end
|
110
|
+
# oauth2_callback_phase
|
111
|
+
# rescue ::OmniAuth::OpenIDConnect::DiscoveryError => e
|
112
|
+
# fail!(:openid_connect_discovery_error, e)
|
113
|
+
# rescue JWT::DecodeError => e
|
114
|
+
# fail!(:jwt_decode_failed, e)
|
115
|
+
# end
|
116
|
+
# end
|
111
117
|
|
112
118
|
def id_token_info
|
113
119
|
# Verify the claims in the JWT
|
data/test_openid_connect.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_openid_connect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burak Akça
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'desc desc desc desc '
|
14
14
|
email:
|