kazana-account
v2.0.2
Published
Kazana core module for all things accounts and authentication
Downloads
14
Readme
kazana-account
Kazana core module for all things accounts and authentication
Install
git clone [email protected]:eHealthAfrica/kazana-account.git
cd kazana-account
npm install
## Usage
The service uses CouchDB's authentication system behind the curtain,
so every user needs a document in the _users
database.
Special requirements:
roles
: must to contain at least on of thekazana-*
roles, see belowroles
: must contain the user id, in the form:"kazana-id:<userId here>"
createdAt
: ISO timestamp for the time the user account has been createdfullname
: must contain the name of the user
An example _users
doc for reference (without the password properties):
{
"_id": "org.couchdb.user:[email protected]",
"_rev": "3-16dd17eaf12eb656ea2d1882ee7018ad",
"name": "[email protected]",
"roles": [
"kazana-id:abcdef",
"kazana-admin"
],
"type": "user",
"createdAt": "2015-04-15T00:00:00.000Z",
"fullname": "Gregor Martynus"
}
User Access Levels (roles)
Routes
GET /api/session
POST /api/session
DELETE /api/session
Test
npm test
Credit
Brought to you by eHealth Africa — good tech for hard places.