neuecc / AsyncOAuth

Portable Client Library and HttpClient based OAuth library, including all platform(for PCL).
101 stars 39 forks source link

OAuth header signing #18

Open YurijOdud opened 9 years ago

YurijOdud commented 9 years ago

Hello,

One question, does OAuth header regenerated after 'GetRequestToken' method execution? var tokenResponse = await authorizer.GetRequestToken("https://api.some_app.com/v0/oauth/initiate");

I meant, for instance, first, when we compute the hash, we did it during app start. We create signature key as key=encode('consumerSecret&') and buffer as Request method&link&blablabla.

But after we get request token, the signature key should be renew as: key=encode('consumerSecret&requestToken.Secret') and buffer as usual.

So, seems like, signature key after getting of request token do not renewed and when we try to navigate by authorize url authorizer.BuildAuthorizeUrl("https://api.some_app.com/v0/oauth/authorize", requestToken); we will have response like '< title >Authorization error</ title >'. error: Invalid token or something went wrong. Please, return to application page and try to authorize once more.

Is it possible to force regenerate a signature, but at the same time keep 'auth_nonce' and 'oauth_timestamp' old values. Or even does it make sense?