Commit 8b2e8f52 authored by Szymon Zimnowoda's avatar Szymon Zimnowoda
Browse files

Merge branch 'sz/docs' into 'dev'

added docs for account registration and login

See merge request !411
parents ce3f756f 8ea706b1
Showing with 53 additions and 1 deletion
+53 -1
......@@ -136,7 +136,59 @@ Get version of the Pod: the git commit and cargo version that it was built from.
}
```
Create the account in the POD, note the `owner` and `database` key requirements.
Create the Database in the POD, note the `owner` and `database` key requirements.
# Account Registration
### POST /v4/account/register
```json
{
"login": "valid email",
"password": "string
}
```
This is the first step of POD Account registration. A mail shall be send to `login` address with the
unique code that needs to be provided in `v4/account/verify` endpoint
### POST /v4/account/verify
```json
{
"login": "valid email",
"code": "1234"
}
```
This is the second step of POD Account registration. The `code` is a string of 4 digits from the mail. If verification is successful it is possible to derive the POD keys using `/account/derive_pod_keys`
# Account login
### POST /v4/account/derive_pod_keys
```json
{
"login": "valid email",
"password": "string"
}
```
This is the first step of logging into the POD. The `login` and `password` must match values from first step of registration. The response contains dedicated `pod_key` and `owner_key`. That can be used later in `/v4/account/open_pod`
Example response:
```json
{
"ownerKey": "securely generated hex string of length 64 characters",
"databaseKey": "securely generated hex string of length 64 characters"
}
```
### POST /v4/account/open_pod
```json
{
"ownerKey": "securely generated hex string of length 64 characters",
"databaseKey": "securely generated hex string of length 64 characters"
}
```
Create the Database in the POD, note the `owner` and `database` key requirements.
If database already exits nothing is changed. After this call it is possible to interact with the POD database (create items, etc).
# Items API
### POST /v4/$owner_key/get_item
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment