Skip to content

Instantly share code, notes, and snippets.

@dalexandrov
Created February 23, 2021 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalexandrov/11bc7520879be7544d88fb78ca6901fe to your computer and use it in GitHub Desktop.
Save dalexandrov/11bc7520879be7544d88fb78ca6901fe to your computer and use it in GitHub Desktop.
private Driver initDriver() {
AuthToken authToken = AuthTokens.none();
if (authenticationEnabled) {
authToken = AuthTokens.basic(username, password);
}
org.neo4j.driver.Config.ConfigBuilder configBuilder = createBaseConfig();
configureSsl(configBuilder);
configurePoolSettings(configBuilder);
return GraphDatabase.driver(uri, authToken, configBuilder.build());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment