mirror of https://github.com/apache/jclouds.git
Revert "Disable timed temporary signed URLs for AWS-S3"
This reverts commit bc0abbaa07
and
re-enables temp-signed URLs for S3.
Closes JCLOUDS-200
This commit is contained in:
parent
3e5aa78521
commit
0930b638e3
|
@ -72,14 +72,17 @@ public class AWSS3BlobRequestSigner extends S3BlobRequestSigner<AWSS3AsyncClient
|
|||
public HttpRequest signGetBlob(String container, String name, long timeInSeconds) {
|
||||
checkNotNull(container, "container");
|
||||
checkNotNull(name, "name");
|
||||
throw new UnsupportedOperationException();
|
||||
HttpRequest request = processor.apply(Invocation.create(getMethod, ImmutableList.<Object> of(container, name)));
|
||||
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpRequest signPutBlob(String container, Blob blob, long timeInSeconds) {
|
||||
checkNotNull(container, "container");
|
||||
checkNotNull(blob, "blob");
|
||||
throw new UnsupportedOperationException();
|
||||
HttpRequest request = processor.apply(Invocation.create(createMethod,
|
||||
ImmutableList.<Object>of(container, blobToObject.apply(blob))));
|
||||
return cleanRequest(signForTemporaryAccess(request, timeInSeconds));
|
||||
}
|
||||
|
||||
private HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds) {
|
||||
|
|
|
@ -50,7 +50,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
|
|||
.addHeader("Date", DATE).build();
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = UnsupportedOperationException.class)
|
||||
@Test
|
||||
public void testSignGetBlobWithTime() {
|
||||
BlobStore getBlobWithTime = requestsSendResponses(init());
|
||||
HttpRequest compare = getBlobWithTime();
|
||||
|
@ -68,7 +68,7 @@ public class AWSS3BlobSignerExpectTest extends S3BlobSignerExpectTest {
|
|||
.addHeader("Date", DATE).build();
|
||||
}
|
||||
|
||||
@Test(expectedExceptions = UnsupportedOperationException.class)
|
||||
@Test
|
||||
public void testSignPutBlobWithTime() throws Exception {
|
||||
BlobStore signPutBloblWithTime = requestsSendResponses(init());
|
||||
Blob blob = signPutBloblWithTime.blobBuilder(name).payload(text).contentType("text/plain").build();
|
||||
|
|
Loading…
Reference in New Issue