|
2 | 2 |
|
3 | 3 | The (temporary) backend for 3Bot login.
|
4 | 4 |
|
| 5 | +## Run service |
| 6 | + |
| 7 | +Go inside virtual environment: |
| 8 | + |
| 9 | +`source ./venv/bin/activate` |
| 10 | + |
| 11 | +Start UWSGI backend: |
| 12 | + |
| 13 | +```bash |
| 14 | +uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030 |
| 15 | +: 1643024584:0;uwsgi --http :5000 --gevent 1000 --http-websockets --master --wsgi-file __main__.py --callable app -s 0.0.0.0:3030 |
| 16 | +``` |
| 17 | + |
5 | 18 | ## Data to save
|
6 | 19 |
|
7 | 20 | ### User
|
8 | 21 |
|
9 | 22 | A user is someone that authenticates using 3botlogin.
|
10 | 23 |
|
11 |
| -| Key | Type | Example | Description | |
12 |
| -| --- | --- | --- | --- | |
13 |
| -| double_name | String | ivan.coene | The name of the user (case insensitive) | |
14 |
| -| sid | String | EWFWEGFWGWGWDS | Socket ID | |
15 |
| -| email | String | <ivan.coene@gmail.com> | The email of the user (case insensitive) | |
16 |
| -| public_key | string | G1gcbyeTnR2i...H8_3yV3cuF | The public key of the user to verify access | |
17 |
| -| device_id | String | abc | The ID of the device where we can send notifications to | |
| 24 | +| Key | Type | Example | Description | |
| 25 | +| ----------- | ------- | ------------------------- | ------------------------------------------------------- | |
| 26 | +| double_name | String | ivan.coene | The name of the user (case insensitive) | |
| 27 | +| sid | String | EWFWEGFWGWGWDS | Socket ID | |
| 28 | +| email | String | <ivan.coene@gmail.com> | The email of the user (case insensitive) | |
| 29 | +| public_key | string | G1gcbyeTnR2i...H8_3yV3cuF | The public key of the user to verify access | |
| 30 | +| device_id | String | abc | The ID of the device where we can send notifications to | |
18 | 31 |
|
19 | 32 | ### Login attempt
|
20 | 33 |
|
21 | 34 | When a user tries to log in, an entry is added
|
22 | 35 |
|
23 |
| -| Key | Type | Example | Description | |
24 |
| -| --- | --- | --- | --- | |
25 |
| -| double_name | String | ivan.coene | The name of the user (case insensitive) | |
26 |
| -| state_hash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The "identifier" of a login-attempt | |
27 |
| -| timestamp | Datetime | 2002-12-25 00:00:00-06:39 | The time when this satehash came in | |
28 |
| -| scanned | Boolean | false | Flag to keep the QR-scanned state | |
29 |
| -| singed_statehash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The signed version of the state hash| |
| 36 | +| Key | Type | Example | Description | |
| 37 | +| ---------------- | -------- | -------------------------- | --------------------------------------- | |
| 38 | +| double_name | String | ivan.coene | The name of the user (case insensitive) | |
| 39 | +| state_hash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The "identifier" of a login-attempt | |
| 40 | +| timestamp | Datetime | 2002-12-25 00:00:00-06:39 | The time when this satehash came in | |
| 41 | +| scanned | Boolean | false | Flag to keep the QR-scanned state | |
| 42 | +| singed_statehash | String | 1gcbyeTnR2iZSfx6r2qIuvhH8 | The signed version of the state hash | |
30 | 43 |
|
31 | 44 | ## Run in dev mode
|
32 | 45 |
|
|
0 commit comments