test_openid_connect 0.1.10 → 0.1.14
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 +12 -12
- data/test_openid_connect.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e10e1cec6f9a05e0cf559cdd1edc601d5f548e23f0c54cd7d92dbaaf7fbe0199
|
4
|
+
data.tar.gz: 163d19c7d68639e8e0ad374a8999e7afc2c5a60a1463e4f6d21a14e08d5e6497
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5d7379853810ccddf51d2e08ecb12a136d8e9791e77a84af66ff7691f6dd254205d06354d106657491cf622c76c54c194e879849aed67b9e4364782c8c41060
|
7
|
+
data.tar.gz: 79b84a7ad34be3c4bf201eb0cc5775f8a80922b6f9f45f86e77929a23e5630c176eda32b979ae7eba6b6babab37f0d11cc15722fb119e145881b01ca14f97170
|
@@ -3,12 +3,12 @@
|
|
3
3
|
require 'omniauth-oauth2'
|
4
4
|
|
5
5
|
module ::OmniAuth
|
6
|
-
module
|
6
|
+
module Oauth2
|
7
7
|
class DiscoveryError < Error; end
|
8
8
|
end
|
9
9
|
|
10
10
|
module Strategies
|
11
|
-
class
|
11
|
+
class Oauth2 < OmniAuth::Strategies::OAuth2
|
12
12
|
puts "*/*/*/*/*/*/*/*/*/*/*/*/*/*/"
|
13
13
|
option :scope, "openid"
|
14
14
|
option :discovery, true
|
@@ -46,7 +46,7 @@ module ::OmniAuth
|
|
46
46
|
|
47
47
|
discovery_params.each do |internal_key, external_key|
|
48
48
|
val = discovery_document[external_key].to_s
|
49
|
-
raise ::OmniAuth::
|
49
|
+
raise ::OmniAuth::Oauth2::DiscoveryError.new("missing discovery parameter #{external_key}") if val.nil? || val.empty?
|
50
50
|
options[:client_options][internal_key] = val
|
51
51
|
end
|
52
52
|
|
@@ -56,8 +56,8 @@ module ::OmniAuth
|
|
56
56
|
|
57
57
|
def request_phase
|
58
58
|
begin
|
59
|
-
discover!
|
60
|
-
rescue ::OmniAuth::
|
59
|
+
discover!
|
60
|
+
rescue ::OmniAuth::Oauth2::DiscoveryError => e
|
61
61
|
fail!(:openid_connect_discovery_error, e)
|
62
62
|
end
|
63
63
|
|
@@ -108,7 +108,7 @@ module ::OmniAuth
|
|
108
108
|
# return fail!(:csrf_detected, CallbackError.new(:csrf_detected, "CSRF detected"))
|
109
109
|
# end
|
110
110
|
# oauth2_callback_phase
|
111
|
-
# rescue ::OmniAuth::
|
111
|
+
# rescue ::OmniAuth::Oauth2::DiscoveryError => e
|
112
112
|
# fail!(:openid_connect_discovery_error, e)
|
113
113
|
# rescue JWT::DecodeError => e
|
114
114
|
# fail!(:jwt_decode_failed, e)
|
@@ -204,10 +204,10 @@ module ::OmniAuth
|
|
204
204
|
end
|
205
205
|
end
|
206
206
|
|
207
|
-
OmniAuth.config.add_camelization 'oauth2', '
|
207
|
+
OmniAuth.config.add_camelization 'oauth2', 'Oauth2'
|
208
208
|
|
209
|
-
module ::OmniAuth
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
end
|
209
|
+
# module ::OmniAuth
|
210
|
+
# module Strategies
|
211
|
+
# autoload :Oauth2, "lib/omniauth/test_openid_connect.rb"
|
212
|
+
# end
|
213
|
+
# end
|
data/test_openid_connect.gemspec
CHANGED