diff options
author | lain <lain@soykaf.club> | 2020-05-07 14:45:20 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-07 14:45:20 +0200 |
commit | f0c22df2265e922a66ca69c3508fe812b8e20b6b (patch) | |
tree | be510abc9cc9154e07b2ec9eaf344e6e4e88bed1 /docs/API/pleroma_api.md | |
parent | 92caae592338a3ca307686e7644f2de18bb57ce5 (diff) | |
parent | 4c92dfb73ef1f40438adf5da009499205a677912 (diff) | |
download | pleroma-f0c22df2265e922a66ca69c3508fe812b8e20b6b.tar.gz pleroma-f0c22df2265e922a66ca69c3508fe812b8e20b6b.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/undo-validator-reduced
Diffstat (limited to 'docs/API/pleroma_api.md')
-rw-r--r-- | docs/API/pleroma_api.md | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/docs/API/pleroma_api.md b/docs/API/pleroma_api.md index b927be026..5895613a3 100644 --- a/docs/API/pleroma_api.md +++ b/docs/API/pleroma_api.md @@ -70,7 +70,49 @@ Request parameters can be passed via [query strings](https://en.wikipedia.org/wi * Response: JSON. Returns `{"status": "success"}` if the account was successfully disabled, `{"error": "[error message]"}` otherwise * Example response: `{"error": "Invalid password."}` -## `/api/pleroma/admin/`… +## `/api/pleroma/accounts/mfa` +#### Gets current MFA settings +* method: `GET` +* Authentication: required +* OAuth scope: `read:security` +* Response: JSON. Returns `{"enabled": "false", "totp": false }` + +## `/api/pleroma/accounts/mfa/setup/totp` +#### Pre-setup the MFA/TOTP method +* method: `GET` +* Authentication: required +* OAuth scope: `write:security` +* Response: JSON. Returns `{"key": [secret_key], "provisioning_uri": "[qr code uri]" }` when successful, otherwise returns HTTP 422 `{"error": "error_msg"}` + +## `/api/pleroma/accounts/mfa/confirm/totp` +#### Confirms & enables MFA/TOTP support for user account. +* method: `POST` +* Authentication: required +* OAuth scope: `write:security` +* Params: + * `password`: user's password + * `code`: token from TOTP App +* Response: JSON. Returns `{}` if the enable was successful, HTTP 422 `{"error": "[error message]"}` otherwise + + +## `/api/pleroma/accounts/mfa/totp` +#### Disables MFA/TOTP method for user account. +* method: `DELETE` +* Authentication: required +* OAuth scope: `write:security` +* Params: + * `password`: user's password +* Response: JSON. Returns `{}` if the disable was successful, HTTP 422 `{"error": "[error message]"}` otherwise +* Example response: `{"error": "Invalid password."}` + +## `/api/pleroma/accounts/mfa/backup_codes` +#### Generstes backup codes MFA for user account. +* method: `GET` +* Authentication: required +* OAuth scope: `write:security` +* Response: JSON. Returns `{"codes": codes}`when successful, otherwise HTTP 422 `{"error": "[error message]"}` + +## `/api/pleroma/admin/` See [Admin-API](admin_api.md) ## `/api/v1/pleroma/notifications/read` |