docs: protected void initAuthenticationHeader() {
          if (isAuthenticated()) {
              // Calculate the v2 signature
              // http://docs.amazonwebservices.com/AmazonS3/latest/dev/RESTAuthentication.html
              // #ConstructingTheAuthenticationHeader
  
              // Date should look like Thu, 17 Nov 2005 18:49:58 GMT, and must be
              // within 15 min. of S3 server time. contentMd5 and type are optional
  
              // We can't risk letting our date get clobbered and being inconsistent
              final String xamzdate = new SimpleDateFormat(DATE_FORMAT, Locale.US).format(new Date());
              final StringJoiner signedHeaders = new StringJoiner(EOL, "", EOL);
              final StringBuilder toSign = new StringBuilder();
              final String key = myKey.charAt(0) == '?' ? "" : myKey;
  
              headers().add("X-Amz-Date", xamzdate);
              signedHeaders.add("x-amz-date:" + xamzdate);
  
              if (!StringUtils.isEmpty(mySessionToken)) {
                  headers().add("X-Amz-Security-Token", mySessionToken);
                  signedHeaders.add("x-amz-security-token:" + mySessionToken);
              }
  
              toSign.append(myMethod).append(EOL).append(myContentMd5).append(EOL).append(myContentType).append(EOL)
                      .append(EOL).append(signedHeaders).append(PATH_SEP).append(myBucket).append(PATH_SEP).append(key);
  
              try {
                  final String signature = b64SignHmacSha1(mySecretKey, toSign.toString());
                  final String authorization = "AWS" + " " + myAccessKey + ":" + signature;
  
                  headers().add("Authorization", authorization);
              } catch (InvalidKeyException | NoSuchAlgorithmException details) {
                  LOGGER.error("Failed to sign S3 request due to {}", details);
              }
          }
      }