public JsonObject toJsonObject() {
        JsonObject creds = new JsonObject();
        creds.addProperty("auth", encodeBase64(username + ":" + password));
        JsonObject auths = new JsonObject();
        auths.add(getRegistryUrl(registry), creds);
        JsonObject root = new JsonObject();
        root.add("auths", auths);
        return root;
    }
Constructor which takes a base64 encoded credentials in the form 'user:password'

@param credentialsEncoded the docker encoded user and password
@param email the email to use for authentication
src/main/java/io/fabric8/maven/docker/access/AuthConfig.java