Fixes a parsing problem
Created by: atombender
To be honest, I have no idea why JSON parsing happens twice in your code. Perhaps it depends on the HTTP client adapter? In OAuth2::Client.request
, you use ResponseObject to translate the response if it's JSON. Then, in OAuth2::Strategy::WebServer
, you seem to assume that the response is always a string, when in my case it is a OAuth2::ResponseHash
. That seems redundant. My patch fixes the issue, but from what I can see, the whole parsing block in WebServer
could be removed.