couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Taber <>
Subject auth & auth problems - non couch app
Date Sun, 09 Jan 2011 00:45:16 GMT
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:

//-- add:
authentication_handler = {couch_httpd_auth, cookie_authentication_handler}
secret =  kasdfjasdj
//-- add:
admin = pass

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 - 

created a user (hashed the password using a js sha 256)
curl -X PUT http://admin:pass@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 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message