Fix login/registration extensions

This commit is contained in:
ChronosX88 2019-12-26 17:39:50 +04:00
parent d548097e32
commit f209420ee0
Signed by: ChronosXYZ
GPG Key ID: 085A69A82C8C511A
2 changed files with 14 additions and 14 deletions

View File

@ -8,10 +8,9 @@ This extension is intended for logging into user account on a server by username
- `profile:login` - `profile:login`
## Error codes ## Error Identifiers
- 0: limit exceed - `invalid_creds`: user ID/password isn't valid
- 1: user ID/password isn't valid
## Use cases ## Use cases
@ -53,7 +52,7 @@ This extension is intended for logging into user account on a server by username
"from": "cadmium.org", "from": "cadmium.org",
"ok": false, "ok": false,
"payload": { "payload": {
"errCode": 1, "errCode": "invalid_creds",
"errText": "Username/password isn't valid" "errText": "Username/password isn't valid"
} }
} }
@ -61,7 +60,7 @@ This extension is intended for logging into user account on a server by username
## Business Rules ## Business Rules
None. - Ratelimit system: enabled
## JSON Schema ## JSON Schema

View File

@ -8,15 +8,16 @@ This extension is intended for creating user accounts on a server
- `profile:register` - `profile:register`
## Error codes ## Error identifiers
- 0: limit exceed - `id_exists`: username/third party ID already taken
- 1: username/third party ID already taken - `reg_disabled`: registration isn't allowed on a server
- 2: registration isn't allowed on a server
## Use cases ## Use cases
- Request: ### Basic registration flow (with CAPTCHA)
- Client:
```json ```json
{ {
@ -34,7 +35,7 @@ This extension is intended for creating user accounts on a server
} }
``` ```
- Response: - Server:
```json ```json
{ {
@ -57,15 +58,15 @@ This extension is intended for creating user accounts on a server
"from": "cadmium.org", "from": "cadmium.org",
"ok": false, "ok": false,
"payload": { "payload": {
"errCode": 1, "errCode": "id_exists",
"errText": "{Username/email/msisdn} already taken" "errText": "Username/email/msisdn already taken"
} }
} }
``` ```
## Business Rules ## Business Rules
None. - Ratelimit system: enabled
## JSON Schema ## JSON Schema