'Create the temporary URL.'

def _get_temp_url(self, container, object_name, method, expires, key):

    path = ('%s/%s/%s' % (urlparse.urlparse(self.object_client.base_url).path, container, object_name))
    hmac_body = ('%s\n%s\n%s' % (method, expires, path))
    sig = hmac.new(key.encode(), hmac_body.encode(), hashlib.sha1).hexdigest()
    url = ('%s/%s?temp_url_sig=%s&temp_url_expires=%s' % (container, object_name, sig, expires))
    return url
