Skip to content

signature_method_rejected on private applications #8

@andyplak

Description

@andyplak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions