Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
import hmac
from hashlib import sha1
from time import time
method = 'GET'
expires = int(time() + 60)
path = '/v1/AUTH_accountxxxx/container/object'
key = 'mykey'
hmac_body = '%s\n%s\n%s' % (method, expires, path)
sig = hmac.new(key, hmac_body, sha1).hexdigest()

...

Code Block
echo https://swift-REGION.cloud.cybera.ca:8080`swift-temp-url GET 600 /v1/AUTH_ACCOUNTxxxx/public_container/my_fancy_object secretkeygoeshere`

...

https://swift-yyc.cloud.cybera.ca:8080/v1/AUTH_ACCOUNTxxxx/public_container/my_fancy_object?temp_url_sig=af0cf3b7597f3bca86895e3796b834c6a93d6a12&temp_url_expires=1401991851

...

https://swift-yyc.cloud.cybera.ca:8080/v1/AUTH_ACCOUNTxxxx/public_container/my_fancy_object?temp_url_sig=af0cf3b7597f3bca86895e3796b834c6a93d6a12&temp_url_expires=1401991851

...