-
Notifications
You must be signed in to change notification settings - Fork 89
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
Comments
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) |
I think this can be closed... |
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.
The text was updated successfully, but these errors were encountered: