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

Creating correct oauth signature with Java #214

Open
rallyestyle opened this issue Jun 4, 2018 · 1 comment
Open

Creating correct oauth signature with Java #214

rallyestyle opened this issue Jun 4, 2018 · 1 comment

Comments

@rallyestyle
Copy link

Hi all.

So i am trying to send a POST request to Wordpress using Java in a Processing sketch and am hitting a brick wall with the oauth signature. I have used all sorts of code to create the signature correctly but whatever i do i am getting the dreaded 'json_oauth1_signature_mismatch' error.

I have used Postman to generate the oauth signature and then used it within Processing to send the the POST request and it works fine so im assuming that whatever Java methods i am using to generate the signature with HMAC-SH1 are not producing the same signature that PHP does on the Wordpress side.

Any ideas from anyone? Has anyone actually used Java to successfully make a POST request and if so do they have any working code?

Thanks in advance for any help.

@rallyestyle
Copy link
Author

Is there some way i can establish the base string that the application creates to produce it's signature? Having a look through the code it looks like the signature might be incorrect because of the way the parameters are normalised on the server side. I have checked the hashing on the client side and server side and provided the base string and signature key are the same then both produce the same results. It must be doing something weird server side.

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

1 participant