How to get Neo4j 2.2 Auth/API Token

女生的网名这么多〃 提交于 2020-01-05 11:43:11

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!