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`
## Error codes
## Error Identifiers
- 0: limit exceed
- 1: user ID/password isn't valid
- `invalid_creds`: user ID/password isn't valid
## Use cases
@ -53,7 +52,7 @@ This extension is intended for logging into user account on a server by username
"from": "cadmium.org",
"ok": false,
"payload": {
"errCode": 1,
"errCode": "invalid_creds",
"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
None.
- Ratelimit system: enabled
## JSON Schema

View File

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