public static Authorization fromBasicCredentials(String username, String secret) {
    String credentials = username + ":" + secret;
    String token = Base64.getEncoder().encodeToString(credentials.getBytes(StandardCharsets.UTF_8));
    return new Authorization("Basic", token);
  }
Create an authentication from basic credentials.

@param username the username
@param secret the secret
@return an {@link Authorization} with a {@code Basic} credentials
jib-core/src/main/java/com/google/cloud/tools/jib/http/Authorization.java