Closed neilco closed 8 years ago
Thanks, could you please provide tests, this could also break some providers implementations I fear.
It might take me a while to get to writing some tests. FYI, I was integrating with MasterCard's MoneySend API when I hit the issue this PR solves. I've been trying to find other examples of public OAuth 1.0a APIs with non-form-encoded POST endpoints—even going through your own API directory—and I'm coming up empty.
This commit fixes an issue were the library is incorrectly normalizing and adding the request body when the content type is not form-encoded. This results in an invalid signature being generated for the request.
The OAuth 1.0a specs states this about normalizing request parameters:
Source: OAuth 1.0a Spec: Normalize Request Parameters
[FIX] Check the content type when preparing the signature parameters.