thingdom / node-neo4j

[RETIRED] Neo4j graph database driver (REST API client) for Node.js
Apache License 2.0
926 stars 138 forks source link

HTTP Basic Auth extension management APIs #126

Closed sheymann closed 9 years ago

sheymann commented 10 years ago

Title edited by @aseemk. The original title was "HTTP Basic Authentication handler is incomplete".

in GraphDatabase constructor(opts):

@option opts url {String} The root URL where the Neo4j graph database
    #     is available, e.g. `'http://localhost:7474/'`. This URL should
    #     include HTTP Basic Authentication info if needed, e.g.
    #     `'http://user:password@example.com/'`.

is incomplete, see https://github.com/neo4j-contrib/authentication-extension

The constructor should send a POST request to the Neo4j http://server:port/auth endpoint.

aseemk commented 10 years ago

Hey @sheymann, the HTTP Basic Auth support isn't for managing auth, it's for using it. E.g. it's not for letting you add or remove users, it's for actually "being" a user when making a query.

sheymann commented 10 years ago

Yes but it the connection to Neo4j is refused if I don't trigger this POST query beforehand, so it's too bad that I have to hande it manually. :)

aseemk commented 10 years ago

But to clarify, you would be registering a user (making this POST request) only once, right? And it should be out-of-band; not part of your regular application requests, right?

sheymann commented 10 years ago

Yes, but I'd like to avoid asking my users to make a POST request manually because they're not all developers.

aseemk commented 10 years ago

I see. Let's make a new issue as a feature request for managing users / working with the auth extension. PRs would be welcome for that. =)

Just for my own curiosity btw, I'd love to hear what you're doing that has this use case!

aseemk commented 10 years ago

Actually no need to make a new issue. I'll edit this one.

aseemk commented 9 years ago

Neo4j 2.2 will ship with a native auth mechanism. It won't have the ability to manage multiple users, etc. yet, so do you see yourself still using the Auth extension?

Also, Neo4j v2 (almost ready, but available on npm; the latest version is 2.0.0-alpha3; docs) adds a custom GraphDatabase::http method to make arbitrary HTTP requests to Neo4j's REST API (#100), so you can now talk to custom plugins/extensions freely.

Given both these things, I think/hope it's okay to close this. Thanks again @sheymann!