when running a session call, I'm getting an error - invalid user or
password - I'm confused with different documentation between Guide,
"What's New in 0.11 - Security, and some blogs - and some of the
documentation assumes a couch app but we're running from node.js and
using http REST calls. Since authorization & authentication is so basic
- am I missing some easier or built-in way of doing this ?
here's the process I followed:
/etc/couchdb/local.ini
//-- add:
authentication_handler = {couch_httpd_auth, cookie_authentication_handler}
[couch_httpd_auth]
secret = kasdfjasdj
[admins]
//-- add:
admin = pass
/etc/couchdb/default.ini
[couch_httpd_auth]
authentication_db = myuserdb
require_valid_user = false
created the myusedb db with Futon
clicked on the fix this button and added an admin and password
(note: couldn't seem to make this work with a command line http call -
help?)
created a user (hashed the password using a js sha 256)
curl -X PUT http://admin:p...@localhost:5984/myuserdb/myuser -d
'{"type":"user", "hashed_password":"dfdjfjsdfdj..."}'
*** tried to do this but get error - invalid user or password
curl -vX POST http://localhost:5984/myuserdb/_session -d
'username="myuser"&password="userpassword"'