问题
Is there a way to retrieve the API token from the REST API?
I want to use the py2neo set_auth_token method.
A blog post stated that the server command would return the api token but it does not.
:server connect
It only lists my user.
I installed a completely new Neo4j 2.2 and did not change any configuration. Unforntunately the docs are not very detailed in regards to the api token feature or i did not find the correct page. All i found was: http://neo4j.com/docs/snapshot/rest-api-security.html
回答1:
The toke based approach was removed in M4. Just use username and password
回答2:
You have to passe an base64
encoded string of username:password
in the request headers as Authentication: Basic bAZenKo0dedString==
.
Example request with username foo, password bar (using Postman)

The string Zm9vOmJhcg==
being a base64 encoded value of the string foo:bar

Regards !
来源:https://stackoverflow.com/questions/29434079/how-to-get-neo4j-2-2-auth-api-token