I'm using the sample class for OAuth defined here: http://oauth.googlecode.com/svn/code/csharp/
I'm using the test server which is related to the OAuth project, available here: http://term.ie/oauth/example/index.php?sig_method=HMAC-SHA1
When I call this service, here is what I'm sending:
Signature Base: POST&http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&oauth_callback%3Doob%26oauth_consumer_key%3Dkey%26oauth_nonce%3D4772605%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1277678337
Authorization Header: OAuth realm="TestClient", oauth_consumer_key="key", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1277678337", oauth_nonce="4772605", oauth_callback="oob", oauth_signature="cxQke5Ni92v9xHnrof8/+9wFPlM="
My Signature: cxQke5Ni92v9xHnrof8/+9wFPlM=
This test service returns back useful information if there are any problems. Here is what it returns:
Invalid signature
<hr />
OAuthRequest Object
(
[parameters:OAuthRequest:private] => Array
(
[oauth_consumer_key] => key
[oauth_signature_method] => HMAC-SHA1
[oauth_timestamp] => 1277678337
[oauth_nonce] => 4772605
[oauth_callback] => oob
[oauth_signature] => cxQke5Ni92v9xHnrof8/+9wFPl
)
[http_method:OAuthRequest:private] => POST
[http_url:OAuthRequest:private] => http://term.ie/oauth/example/request_token.php
[base_string] => POST&http%3A%2F%2Fterm.ie%2Foauth%2Fexample%2Frequest_token.php&oauth_callback%3Doob%26oauth_consumer_key%3Dkey%26oauth_nonce%3D4772605%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1277678337
)
The error is "Invalid signature". When you look at it's calculated signature and my signature - they are the same, but the server-side truncated the last two characters. So, I've tried truncating the last two characters (of the signature, itself) on my side - and I still get the same error.
In other words, it is processing the identical "base_string"/"Signature Base" as me, and even getting the same signature (although it shows it truncated). I don't know what else to try. Anyone have any ideas on this? I'm at a dead stop.
-Rob