ClientFilter[] filters;
@Nullable String username = getUsername();
@Nullable String password = getPassword();
if ( username != null && password != null ) {
filters = new ClientFilter[]{new HTTPBasicAuthFilter( username, password )};
} else {
filters = new ClientFilter[0];
}
return new CouchDatabase( uri, dbName, filters );