neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

infere authMode automatically #66

Closed flip111 closed 8 years ago

flip111 commented 8 years ago

I assume the username and password are a requirement for authMode. Right now i have a small wrapper doing

    if ($authUser !== null AND $authPassword !== null) {
      $authMode = true;
    } else {
      $authMode = false;
    }

is there any reason why this extra boolean is needed explicitly ?

ikwattro commented 8 years ago

Yes, before in neo4j <2.2 , you had to use a dedicated neo4j server plugin for authentication, the true was loading a specific extension of the client to use with this plugin.

However, changing the true will break the current API, so this is planned in the GraphAware repo and described by the Neo4j TCK (not public yet) which will require standard connection definitions across all drivers :

Currently discussion between :

Note that the given examples are for one protocol only, so in the neo4j client you'll have to do it on the connection.