File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
lib/spark_api/authentication/oauth2_impl Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1+ v1.5.5
2+ - Add logging of an errored oauth2 response
3+
14v1.5.4
25 - Fix a problem with fetching counts with the http_method_override: true option supplied.
36
Original file line number Diff line number Diff line change 1- 1.5.4
1+ 1.5.5
Original file line number Diff line number Diff line change @@ -15,14 +15,18 @@ def initialize(app)
1515 def on_complete ( env )
1616 body = MultiJson . decode ( env [ :body ] )
1717 SparkApi . logger . debug { "[oauth2] Response Body: #{ body . inspect } " }
18+
1819 unless body . is_a? ( Hash )
1920 raise InvalidResponse , "The server response could not be understood"
2021 end
22+
2123 case env [ :status ]
2224 when 200 ..299
2325 SparkApi . logger . debug { "[oauth2] Success!" }
2426 session = OAuthSession . new ( body )
25- else
27+ else
28+ SparkApi . logger . warn { "[oauth2] failure #{ body . inspect } " }
29+
2630 # Handle the WWW-Authenticate Response Header Field if present. This can be returned by
2731 # OAuth2 implementations and wouldn't hurt to log.
2832 auth_header_error = env [ :request_headers ] [ "WWW-Authenticate" ]
You can’t perform that action at this time.
0 commit comments