public static String encode(String username, String password) {
        String up = username + ':' + password;
        return "Basic " + Base64.getEncoder().encodeToString(up.getBytes(StandardCharsets.ISO_8859_1));
    }
Encode username and password in BASIC format
common/util/src/main/java/io/apiman/common/util/Basic.java