Giter Club home page Giter Club logo

Comments (5)

bytespider avatar bytespider commented on June 20, 2024

Does .post() do what you want it to? Your right about the header, it should have been application/json.

from jsoauth.

zhusee2 avatar zhusee2 commented on June 20, 2024

Here I've got a similar problem, too.

I use .request() to send a header with content type application/json to Google's OAuth service. It worked fine in 1.3, but now fails in 1.3.1. After some research, I found it's caused by the conditional expression at line 407. It detects that I manually send a Content-Type header and then blocks the init of signatureData array.

So maybe adding a content type to .getJSON() and .postJSON() will be a good way to deal with all this, I guess?

Update: I found that in my case, only adding url.query.toObject() to signatureData can pass Google's service; adding data to signatureData will also cause failure like adding nothing to signatureData… not sure if it's related to the spec you mention at line 407.

from jsoauth.

bytespider avatar bytespider commented on June 20, 2024

The spec says the params are signed if the content type is single part and url-form-encoded. I dont think application/json meets both those. I could be wrong but i'll revert the change for the time being.

On 29 Jul 2011, at 02:40, [email protected] wrote:

Here I've got a similar problem, too.

I use .request() to send a header with content type application/json to Google's OAuth service. It worked fine in 1.3, but now fails in 1.3.1. After some research, I found it's caused by the conditional expression at line 407. It detects that I manually send a Content-Type header and then blocks the init of signatureData array.

So maybe adding a content type to .getJSON() and .postJSON() will be a good way to deal with all this, I guess?

Reply to this email directly or view it on GitHub:
#17 (comment)

from jsoauth.

zhusee2 avatar zhusee2 commented on June 20, 2024

Yeah, you're right about the spec. Thanks for the explanation.
I'll find some other ways to solve my issue, so you don't have to do the reversion :)

from jsoauth.

bytespider avatar bytespider commented on June 20, 2024

Im going to close this for the time being

from jsoauth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.