> +
> "?Signature=genkB2vLxe3AWV/bPvRTMqQts7E%3D&Expires=1212683902&AWSAccessKeyId=identity")
> + .addHeader("Expect", "100-continue")
> + .addHeader("Host", "container.s3.amazonaws.com")
> + .addHeader("Date", "Thu, 05 Jun 2008 16:38:19 GMT").build();
> + }
> +
> + @Test
> + public void testSignPutBlobWithTime() throws Exception {
> + BlobStore signPutBloblWithTime = requestsSendResponses(init());
> + Blob blob =
> signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build();
> + HttpRequest compare = putBlobWithTime();
> + compare.setPayload(blob.getPayload());
> +
> assertEquals(signPutBloblWithTime.getContext().getSigner().signPutBlob(container,
> blob, 3l /* seconds */),
> + compare);
> + }
> +
@demobox The logic this PR adds is whether temp signed URLs work. The added
expect tests and existing live tests already verify that the new logic works as
expected. Bear in mind that regular (i.e. without expiry) signed get/put
requests use the Authorized header and temp signed/get put requests use the
query string parameters so both code paths are already getting exercised.
Checking whether there's a pre-existing query parameter is IMO outside the
scope of this patch. As the implementation stands (indedendent of this patch)
it should never happen and I'm happy to add a check for this in a separate
patch if you'd like.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/71/files#r5363982