omniauth-raven 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/omniauth/raven/version.rb +1 -1
- data/lib/omniauth/strategies/raven.rb +4 -4
- metadata +1 -1
@@ -59,7 +59,7 @@ module OmniAuth
|
|
59
59
|
return fail!("invalid_protocol_version") unless ver == options[:raven_opt][:version]
|
60
60
|
|
61
61
|
#Check the url
|
62
|
-
return fail!("mismatched urls", Exception
|
62
|
+
return fail!("mismatched urls", Exception.new("url: " + url + " vs callback: " + callback_url) ) unless url == callback_url
|
63
63
|
|
64
64
|
#Check the time skew
|
65
65
|
issuetime = timeforRFC3339( issue )
|
@@ -67,13 +67,13 @@ module OmniAuth
|
|
67
67
|
return fail!("time_skew") unless skew.abs < options[:raven_opt][:max_skew]
|
68
68
|
|
69
69
|
#Optionally check that interaction with the user took place
|
70
|
-
return fail!(:invalid_response, Exception
|
70
|
+
return fail!(:invalid_response, Exception.new("No raven interaction took place, but it was requested") ) if ( iact == 'yes' && auth == "" )
|
71
71
|
|
72
72
|
#Optionally check that this response matches a request
|
73
73
|
if @match_response_and_request
|
74
74
|
response_id = unescape( params )
|
75
75
|
request_id = session['request_id']
|
76
|
-
return fail!("mismatched_response", Exception
|
76
|
+
return fail!("mismatched_response", Exception.new("req_id:" + request_id + " vs resp_id:" + response_id) ) unless request_id == response_id
|
77
77
|
end
|
78
78
|
|
79
79
|
#If we got here, and status is 200, then yield the principal
|
@@ -94,7 +94,7 @@ module OmniAuth
|
|
94
94
|
super
|
95
95
|
else
|
96
96
|
#And return the error code if it is something else.
|
97
|
-
return fail!(:invalid_credentials, Exception
|
97
|
+
return fail!(:invalid_credentials, Exception.new("Raven status:" + status) )
|
98
98
|
end
|
99
99
|
|
100
100
|
end
|