@Test void testGetObjectACLSignature() { Invocation invocation = Invocation.create(method(S3Client.class, "getObjectACL", String.class, String.class), ImmutableList.<Object>of(BUCKET_NAME)); HttpRequest getObjectACL = GeneratedHttpRequest.builder().method("GET") .invocation(invocation) .endpoint("https: .addHeader(HttpHeaders.HOST, BUCKET_NAME + ".s3.cn-north-1.amazonaws.com.cn") .addQueryParam("acl", "") .build(); HttpRequest filtered = filter(temporaryCredentials).filter(getObjectACL); assertEquals(filtered.getFirstHeaderOrNull("Authorization"), GET_OBJECT_ACL_RESULT); }
@Override public HttpRequest filter(HttpRequest request) throws HttpException { if (useChunkedUpload(request)) { return signForChunkedUpload(request); } return signForAuthorizationHeader(request); }
RequestAuthorizeSignatureV4 implements RequestAuthorizeSignature { @Override public HttpRequest filter(HttpRequest request) throws HttpException { if (useChunkedUpload(request)) { return signForChunkedUpload(request); } return signForAuthorizationHeader(request); } }
RequestAuthorizeSignatureV4 implements RequestAuthorizeSignature { @Override public HttpRequest filter(HttpRequest request) throws HttpException { if (useChunkedUpload(request)) { return signForChunkedUpload(request); } return signForAuthorizationHeader(request); } @Inject  RequestAuthorizeSignatureV4(Aws4SignerForAuthorizationHeader signerForAuthorizationHeader,
         Aws4SignerForChunkedUpload signerForChunkedUpload,
         Aws4SignerForQueryString signerForQueryString); }
RequestAuthorizeSignatureV4 implements RequestAuthorizeSignature { @Override public HttpRequest filter(HttpRequest request) throws HttpException { if (useChunkedUpload(request)) { return signForChunkedUpload(request); } return signForAuthorizationHeader(request); } @Inject  RequestAuthorizeSignatureV4(Aws4SignerForAuthorizationHeader signerForAuthorizationHeader,
         Aws4SignerForChunkedUpload signerForChunkedUpload,
         Aws4SignerForQueryString signerForQueryString); @Override HttpRequest filter(HttpRequest request); @Override HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds); }
RequestAuthorizeSignatureV4 implements RequestAuthorizeSignature { @Override public HttpRequest filter(HttpRequest request) throws HttpException { if (useChunkedUpload(request)) { return signForChunkedUpload(request); } return signForAuthorizationHeader(request); } @Inject  RequestAuthorizeSignatureV4(Aws4SignerForAuthorizationHeader signerForAuthorizationHeader,
         Aws4SignerForChunkedUpload signerForChunkedUpload,
         Aws4SignerForQueryString signerForQueryString); @Override HttpRequest filter(HttpRequest request); @Override HttpRequest signForTemporaryAccess(HttpRequest request, long timeInSeconds);  }