I'm making a service request(POST) with curl and OAuth signature.
I have created a signature with the following code:
$signature_method = new OAuthSignatureMethod_HMAC(strtolower('SHA1'));
$consumer = new DrupalOAuthConsumer($consumer_credentials['c_key'], $consumer_credentials['c_secret'], array());
$request = DrupalOAuthRequest::from_consumer_and_token($consumer, NULL, $options[$op]['method'], $options[$op]['url'], NULL);
$request->sign_request($signature_method, $consumer, null);
And added to the curl header the OAuth credentials. The problem is that when on the server side the signatures don't match. For example on the server:
rsXZTiGBRYU+8WjxfnxZQ1g3IPA=
and client:
rsXZTiGBRYU 8WjxfnxZQ1g3IPA=
and because of this it's giving me an "Invalid signature" error. I think it's related to some encoding but can't figure it out.
Anybody has any ideas as to what should I do?