I think there were some errors in the signature example (%40 for %26).

Also, Ralph pointed out to me that we need to include the nonce, timestamp, and version in the access token. I will update the examples and publish a new version.

I am now generating the signature based on the following stanza:

<iq from='[EMAIL PROTECTED]/bot'
    id='sub1'
    to='feeds.worldgps.tld'
    type='set'>
  <pubsub xmlns='http://jabber.org/protocol/pubsub'>
    <subscribe node='bard_geoloc'/>
    <oauth xmlns='urn:xmpp:tmp:oauth'>
      <oauth_consumer_key>0685bd9184jfhq22</oauth_consumer_key>
      <oauth_nonce>4572616e48616d6d65724c61686176</oauth_nonce>
      <oauth_signature>Z0F5zmPWwbunk5dc2hNBn1NgBj4=</oauth_signature>
      <oauth_signature_method>HMAC-SHA1</oauth_signature_method>
      <oauth_timestamp>1218137833</oauth_timestamp>
      <oauth_token>ad180jjd733klru7</oauth_token>
      <oauth_version>1.0</oauth_version>
    </oauth>
  </pubsub>
</iq>

The Signature Base String is:

iq&feeds.worldgps.tld%26travelbot%40findmenow.tld%2Fbot&oauth_consumer_key%3D0685bd9184jfhq22%26oauth_nonce%3D4572616e48616d6d65724c61686176%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1218137833%26oauth_token%3Dad180jjd733klru7%26oauth_version%3D1.0

By my calculations, the signature is:

Z0F5zmPWwbunk5dc2hNBn1NgBj4=

I calculated this using Python:

h = hmac.new("consumersecret&tokensecret","iq&feeds.worldgps.tld%26travelbot%40findmenow.tld%2Fbot&oauth_consumer_key%3D0685bd9184jfhq22%26oauth_nonce%3D4572616e48616d6d65724c61686176%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1218137833%26oauth_token%3Dad180jjd733klru7%26oauth_version%3D1.0",hashlib.sha1)

Independent verifications would be appreciated. :)

/psa

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to