Has anyone successfully managed to get Oauth working with Mivascript?
I've found the following Oauth test site:
http://term.ie/oauth/example/
and have the following Mivascript code:
I keep getting an "invalid signature" response, but I'm not quite sure where I've gone wrong.
I've found the following Oauth test site:
http://term.ie/oauth/example/
and have the following Mivascript code:
Code:
<mvassign name="oauth_consumer_key" value="key" /> <mvassign name="oauth_signature_method" value="HMAC-SHA1" /> <mvassign name="oauth_version" value="1.0" /> <mvassign name="oauth_timestamp" value="{dyn_time_t}" /> <mvassign name="oauth_nonce" value="{makesessionid( )}" /> <mvassign name="l.key" value="secret" /> <mvassign name="l.signaturebase" value="{'GET&' $ encodeattribute(l.RequestTokenURL) $ '&oauth_consumer_key%3D' $ oauth_consumer_key $ '%26oauth_nonce%3D' $ oauth_nonce $ '%26oauth_signature_method%3D' $ oauth_signature_method $ '%26oauth_timestamp%3D' $ oauth_timestamp $ '%26oauth_version%3D1.0'}" /> <mvassign name="l.ok" value="{crypto_hmac_sha1(l.signaturebase, l.key, 'bin', oauth_signature)}" /> <mvassign name="oauth_signature" value="{crypto_base64_encode(oauth_signature)}" /> <mvcall action="{l.RequestTokenURL $ '?oauth_consumer_key=' $ oauth_consumer_key $ '&oauth_nonce=' $ oauth_nonce $ '&oauth_signature_method=' $ oauth_signature_method $ '&oauth_timestamp=' $ oauth_timestamp $ '&oauth_version=' $ oauth_version $ '&oauth_signature=' $ encodeattribute(oauth_signature)}" method="GET"> <mveval expr="{callvalue}" /> </mvcall>
Comment