happydpc / goauth2

Automatically exported from code.google.com/p/goauth2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Allow custom JSON Decoding #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When using OAuth though Mashery (http://www.mashery.com/)
Their response is returned as follows:

{"jsonrpc":"2.0","result":{... expected oauth values here ...}}

The current json deserialization in 'updateToken' has no idea how to deal with 
that; it does not expect that nested structure.

The attached patch allows a user of goauth2 to provide their own JSON handling 
if desired. If none is provided the default (current) JSON decoding is used.

Original issue reported on code.google.com by aventure...@gmail.com on 1 Jun 2014 at 7:45

Attachments:

GoogleCodeExporter commented 9 years ago
This is an OAuth2 package. If Mashery speaks something else, write a separate 
package for whatever they speak. I see no need for us to hack in hooks for 
other protocols here.

Feel free to argue if I'm wrong and this is actually OAuth somehow.

Original comment by bradfitz@golang.org on 10 Aug 2014 at 6:06