Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post request should include body parameters in base string #14

Open
ashgibson opened this issue Jul 9, 2014 · 2 comments
Open

post request should include body parameters in base string #14

ashgibson opened this issue Jul 9, 2014 · 2 comments

Comments

@ashgibson
Copy link
Contributor

I was having some issues using this plugin with the Xero API, trying to POST data. I came across this discussion - https://community.xero.com/developer/discussion/24421/

If you see Tony Rule's comment where he says "When using POST, any form parameters need to be included in the signature base string, whereas PUT method doesn't use them. http://oauth.net/core/1.0a/#anchor13"

I changed my guzzle request to use PUT instead and it worked. I am wondering if this oauth plugin should detect the request type and include any form fields in the base string.

@casperbakker
Copy link
Contributor

The Xero API works with XML body's, and these are never used in the signature for oauth. And the Xero API uses PUT and POST in the wrong way. They use PUT for creating a new resource and POST for updating resources. Completely backwards from the RFC's.

This plugin only takes the POST body in the signature if these are post fields, not if it is a XML or JSON body. Exactly as it should work.

I guess you already got it working with Xero. But otherwise I have created a Xero PHP client, based on Guzzle: https://github.com/picqer/xero-php-client (Now with Guzzle 6 support)

@Aerendir
Copy link

I think this can be closed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants