rack-oauth2 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rack/oauth2/client.rb +2 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
data/lib/rack/oauth2/client.rb
CHANGED
@@ -100,7 +100,7 @@ module Rack
|
|
100
100
|
else
|
101
101
|
raise 'Unknown Token Type'
|
102
102
|
end
|
103
|
-
rescue MultiJson::
|
103
|
+
rescue MultiJson::DecodeError
|
104
104
|
# NOTE: Facebook support (They don't use JSON as token response)
|
105
105
|
AccessToken::Legacy.new Rack::Utils.parse_nested_query(response.body).with_indifferent_access
|
106
106
|
end
|
@@ -108,7 +108,7 @@ module Rack
|
|
108
108
|
def handle_error_response(response)
|
109
109
|
error = parse_json response.body
|
110
110
|
raise Error.new(response.status, error)
|
111
|
-
rescue MultiJson::
|
111
|
+
rescue MultiJson::DecodeError
|
112
112
|
raise Error.new(response.status, :error => 'Unknown', :error_description => response.body)
|
113
113
|
end
|
114
114
|
|