summary refs log tree commit diff
path: root/res
diff options
context:
space:
mode:
authorLuke Barnard <lukeb@openmarket.com>2017-05-03 11:55:44 +0100
committerLuke Barnard <lukeb@openmarket.com>2017-05-03 12:04:12 +0100
commit34ed4f4206b4ff6830c381beabbaa7739b1a63f8 (patch)
treefc7d7f3752b1a863728e5fb7ce874ad37f339e94 /res
parentMerge pull request #2180 from matrix-org/rav/fix_timeout_on_timeout (diff)
downloadsynapse-34ed4f4206b4ff6830c381beabbaa7739b1a63f8.tar.xz
Implement username availability checker
Outlined here: https://github.com/vector-im/riot-web/issues/3605#issuecomment-298679388

```HTTP
GET /_matrix/.../register/available
{
    "username": "desiredlocalpart123"
}
```

If available, the response looks like
```HTTP
HTTP/1.1 200 OK
{
    "available": true
}
```

Otherwise,
```HTTP
HTTP/1.1 429
{
    "errcode": "M_LIMIT_EXCEEDED",
    "error": "Too Many Requests",
    "retry_after_ms": 2000
}
```
or
```HTTP
HTTP/1.1 400
{
    "errcode": "M_USER_IN_USE",
    "error": "User ID already taken."
}

```
or
```HTTP
HTTP/1.1 400
{
    "errcode": "M_INVALID_USERNAME",
    "error": "Some reason for username being invalid"
}
```
Diffstat (limited to 'res')
0 files changed, 0 insertions, 0 deletions