Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ public void testWithoutExpiration() throws Exception {
//passed
}

@Test
/**
* Based on https://docs.aws.amazon
* .com/AmazonS3/latest/API/sigv4-query-string-auth.html.
* Based on <a href="https://docs.aws.amazon.com
* /AmazonS3/latest/API/sigv4-query-string-auth.html">AWS example</a>.
*/
@Test
public void testWithAWSExample() throws Exception {

Map<String, String> queryParams = new HashMap<>();
Expand All @@ -131,7 +131,7 @@ protected void validateDateAndExpires() {
final SignatureInfo signatureInfo = parser.parseSignature();

LowerCaseKeyStringMap headers = new LowerCaseKeyStringMap();
headers.put("host", "examplebucket.s3.amazonaws.com");
headers.put("host", "localhost");

final String stringToSign =
StringToSignProducer.createSignatureBase(signatureInfo, "https", "GET",
Expand All @@ -142,7 +142,7 @@ protected void validateDateAndExpires() {
+ "20130524T000000Z\n"
+ "20130524/us-east-1/s3/aws4_request\n"
+
"3bfa292879f6447bbcda7001decf97f4a54dc650c8942174ae0a9121cf58ad04",
"521c030411bb1ad61412d44aff2a1b0916e473d2dc275ada8e5569c16ecdee36",
stringToSign);
}

Expand Down