Getting current user information from CouchDB? -


How do you obtain information about the current user while navigating the app from the CouchDB database? I need this information to query the right data for every information. For example, in Rail, it is normal to use a filter in advance, which sets a variable named current_user with every request.

After successfully launching the session, with the post / _session, I tried the efforts suggested by the following Cochindi docs, but this does not return the full user document with the email and other fields needed. GET / _session

I also tried to request user documentation from the ID, but I am getting an error.

  get /_users/org.couch.user:< Name & gt;   

Error:

  {error: not_found, reason: missing}   

Any help would be greatly appreciated .

I found this work by adding two requests:

GET '/ _session '

GET' /_users/org.couch.user: '+ responseFromFirst.userCtx.name

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -