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

signature_method_rejected on private applications #8

Open
andyplak opened this issue Dec 19, 2016 · 1 comment
Open

signature_method_rejected on private applications #8

andyplak opened this issue Dec 19, 2016 · 1 comment

Comments

@andyplak
Copy link

I've been successfully using this XeroBundle for over a year now, but have encountered an issue when recently updating this and guzzle. When trying to put a banktransaction into Xero I get the following 400 Bad Request:

response: oauth_problem=signature_method_rejected&oauth_problem_advice=Private applications must use the RSA-SHA1 signature

After a bit of digging I came across this commit with Guzzle's oauth subscriber:
guzzle/oauth-subscriber@4736b9a

I see the you set the signature_method here, but I can't see it used anywhere.

Modifying the initialization of $middlewhere gets me up and running again:

$middleware = new Oauth1([
    'consumer_key' => $config['consumer_key'],
    'consumer_secret' => $config['consumer_secret'],
    'token' => $config['token'],
    'token_secret' => $config['token_secret'],
    'signature_method' => $config['signature_method'],
    'private_key_file' => $config['private_key'],
    'private_key_passphrase' => null
]);

Obviously that won't work for people with a passphrase set on their private key file, but its a step in the right direction.

@andyplak
Copy link
Author

I've just spotted that pull request #7 submitted by @mradcliffe handles both this and the another issue I ran into with the trailing slash. Would be good to see that merged in.

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