Created
August 11, 2009 16:47
-
-
Save steadicat/165952 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// from local.ini | |
[couch_httpd_auth] | |
authentication_db = users | |
require_valid_user = true | |
// http://localhost:5984/users/_design/_auth/_view/users | |
{"total_rows":1,"offset":0,"rows":[ | |
{"id":"users","key":"stefano","value":{"password_sha":"EwPfA3e1xccq6zn5M0qUp6141hU=","roles":["_reader","_writer","_admin"],"seed":"1234"}} | |
]} | |
// from the Erlang shell | |
2> couch_util:encodeBase64(crypto:sha(["1234", "test"])). | |
<<"EwPfA3e1xccq6zn5M0qUp6141hU=">> | |
> curl http://stefano:test@localhost:5984/ | |
{"error":"unauthorized","reason":"Name or password is incorrect."} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment