kazana-account
Kazana core module for all things accounts and authentication
Install
git clone git@github.com:eHealthAfrica/kazana-account.gitcd kazana-accountnpm 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):
User Access Levels (roles)
Access Level | role | description |
---|---|---|
Data Provider | kazana-data-provider |
User can submit raw data |
Reviewer | kazana-data-reviewer |
User can see validation errors and can amend submitted raw data |
Analyst | kazana-analyst |
User has access to integrated data |
Admin | kazana-admin |
User can configure systems, manage accounts, etc |
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.