Create User
Do the following steps to create a new user.
1. Open User Database
- Connect to the host via ssh; make sure your ssh client has port-forwarding enabled from a local port of your choice to the exposed port of the cordatastore container.
- Lets say your local port is 5985; within your local browser open http://localhost:5985/_utils
- Login as admin and switch to the
_users
database.
2. Create User Document
Klick [New Document] |
Paste, modify and save the following document:
{ "_id": "org.couchdb.user:1", "name": "1", "displayName": "User 1", "email": "user1@cubbles.world", "logins": { "local": { "login": "user1" } }, "roles": [], "type": "user", "password": "pass" }
Properties:
doc._id = "org.couchdb.users:" + doc.name
//document iddoc.name
//unique username; will be used to refer to the user from other documentsdoc.displayName
//in future this will be used within the user-interfacedoc.logins.local
//loginname of the user (may be, we support different logins in future - so this is labeled as the 'local' login)doc.roles
//currently not used; as CouchDB requires the property we pass an empty array.doc.password
//the password for the local login (don't care, the value will be saved encrypted as soon as you 'save' the document)
3. Respond via eMail
Dear ...,
thanks for requesting an account for https://cubbles.world
Your initial password: ...
We recommend to change your password immediately using the manageprofile -api:
curl -X PUT -H "Content-type: application/json" -u {myLogin}:{myPassword} https://cubbles.world/_api/manageprofile/users/{mylogin}/password -d {\"newPassword\":\"{myNewPassword}\"}
Best regards,
...