Users

Users management in pryv is done by editing files. You can use either:

  • users.json (which path can be set using the user path option)
  • .htpasswd (which path can be set using the htpasswd path option).

Currently, you can only use either, not both. If the htpasswd-path configuration option is set, the user-path option will be ignored.

users.json

This is a flat JSON file, with one field per user, its username. Each user entry has one field, the user’s password hash (SHA-256).

Its content looks like:

{
  "user1": {
    "password": "superlongsha256"
  },
  "user2": {
    "password": "anothersuperlongsha256"
  }
}

To add a new user, simply add a new entry to this file.

.htpasswd

This file uses Apache’s .htpasswd file format (see apache’s documentation for details).

Use this file if you want to share your users credentials among several applications using .htpasswd files on your machine.