Guest User

Untitled

a guest
Mar 23rd, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. curl -u foo:XXXX http://localhost:5984/_session
  2. {"ok":true,"userCtx":{"name":"foo","roles":[]},"info":{"authentication_db":"_users","authentication_handlers":["cookie","default"],"authenticated":"default"}}
  3.  
  4. curl http://localhost:5984/_session -H
  5. 'Content-Type:application/x-www-form-urlencoded' -d 'name=foo&password=XXXX'
  6. {"error":"unauthorized","reason":"Authentication required."}
  7.  
  8. curl http://localhost:5984/_session -H 'Content-Type:application/x-www-form-urlencoded' -d 'name=foo&password=XXXX'
  9. {"ok":true,"name":"foo","roles":[]}
  10.  
  11. [chttpd]
  12. authentication_db = _users
  13. require_valid_user = true
Add Comment
Please, Sign In to add comment