mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-09 12:11:03 +00:00
Fix login/registration extensions
This commit is contained in:
parent
d548097e32
commit
f209420ee0
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user