omniauth-authentiq 0.3.2 → 0.3.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f174843e97885e59bad322608c5c0de9e1bc080
|
4
|
+
data.tar.gz: 5bd0a95d0d872a803b57c770890855a16c4c97c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '08184dcf38134b84789087afec1ee301c967a527c9fdef1b38290ca3a3f1d134c626595dc77e8434ae316de22aaa1cfc4dc3095b1372760294f3b9c8e9d3b992'
|
7
|
+
data.tar.gz: d6e58028fe537d983746691f35a99d91fa8d30023d53c400109c4503b0c7198c0fe71294976b934e74a8db839d55d84042543eed59cb17dc7ff0a83e858dd860
|
@@ -72,7 +72,10 @@ module OmniAuth
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def decode_idtoken(idtoken)
|
75
|
-
|
75
|
+
::JWT.decode(
|
76
|
+
idtoken,
|
77
|
+
@options.client_secret,
|
78
|
+
true,
|
76
79
|
algorithm: helpers.algorithm(@options),
|
77
80
|
iss: @options.client_options.site,
|
78
81
|
verify_iss: true,
|
@@ -82,7 +85,7 @@ module OmniAuth
|
|
82
85
|
verify_jti: false,
|
83
86
|
verify_sub: true,
|
84
87
|
leeway: 60
|
85
|
-
|
88
|
+
).first
|
86
89
|
end
|
87
90
|
|
88
91
|
def should_sign_out?
|
@@ -46,7 +46,10 @@ module OmniAuth
|
|
46
46
|
|
47
47
|
def decode_logout_token(logout_token)
|
48
48
|
begin
|
49
|
-
logout_jwt = JWT.decode
|
49
|
+
logout_jwt = JWT.decode(
|
50
|
+
logout_token,
|
51
|
+
@options.client_secret,
|
52
|
+
true,
|
50
53
|
:algorithm => helpers.algorithm(@options),
|
51
54
|
:iss => @options.client_options.site,
|
52
55
|
:verify_iss => true,
|
@@ -56,8 +59,8 @@ module OmniAuth
|
|
56
59
|
:verify_jti => true,
|
57
60
|
:verify_sub => true,
|
58
61
|
:leeway => 60
|
59
|
-
|
60
|
-
if validate_events(logout_jwt
|
62
|
+
)
|
63
|
+
if validate_events(logout_jwt.first) && validate_nonce(logout_jwt.first) && validate_sid(logout_jwt.first)
|
61
64
|
@request.update_param('sid', logout_jwt[0]['sid'])
|
62
65
|
else
|
63
66
|
raise(ArgumentError, 'Logout JWT validation failed. Missing session, events claim or nonce claim is present')
|
@@ -77,7 +80,7 @@ module OmniAuth
|
|
77
80
|
if @options.has_key?(:remote_sign_out_handler) && (@options[:remote_sign_out_handler].respond_to? :call)
|
78
81
|
@options[:remote_sign_out_handler]
|
79
82
|
else
|
80
|
-
OmniAuth::logger.send(:warn, 'It
|
83
|
+
OmniAuth::logger.send(:warn, 'It looks like remote logout is configured on your Authentiq client but \':remote_sign_out_handler\' is not implemented on devise or omniauth')
|
81
84
|
raise(NotImplementedError, 'Remote sign out failed because the client\'s \':remote_sign_out_handler\' is not implemented on devise or omniauth')
|
82
85
|
end
|
83
86
|
end
|