mirror of
https://github.com/cadmium-im/cadmium-docs-legacy.git
synced 2024-11-22 10:22:22 +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`
|
- `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
|
||||||
|
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user