Is there anyway to have a Role Based Access Control user management mechanism for a javascript app that uses couchDb as the database backend? According to what I have been looking into, when it comes to security all the talks are about setting up different users for the couchDb instance itself, rather than having user and role information inside one database that belongs to a specific application.
In addition, I would like to know how does authentication and role-based authorization work if you have per-app, in-database user & role information? Is there a token-based authentication way or what?