doc: updated documentation

This commit is contained in:
silver 2023-08-19 21:29:23 +01:00
parent 8bec5e87b5
commit bacb03d051

View file

@ -106,7 +106,7 @@ All responses:
### POST /ldap/recover/password/auth
```json
{
{
"auth" : "Auth key from teh email",
"pass" : "Password the user chooses"
}
@ -127,6 +127,65 @@ Success:
{"result": "success", "success": "Password set"}
```
### POST /ldap/recover/ssh/request
This endpoint can set emails for old skynet members who previously logged in via ssh keys.
1. Request for their account.
2. A list of public keys will be displayed.
3. Sign using one of the private keys.
4. Submit the pem value.
```bash
echo "auth code" | ssh-keygen -Y sign -n file -f /path/to/private/key
```
```json
{
"user" : "Skynet username",
"email" : "Email to set"
}
```
Errors:
```json
{"result": "error", "error": "Skynet email not permitted."}
```
```json
{ "result": "success", "success": { "auth": "", "keys": [] }}
```
```json
{ "result": "success", "success": { "auth": "code here", "keys": ["key 1", "key 2"] }}
```
### POST /ldap/recover/ssh/verify
```json
{
"user" : "Skynet username",
"auth_signed" : "signed auth code"
}
```
#### Errors
```json
{ "result": "error"}
```
```json
{ "result": "error", "error": "Incorrect signed format"}
```
```json
{"result": "error", "error": "no valid key"}
```
#### Success
```json
{"result": "success", "success": "key valid"}
```
## Responses
Generic responses which is used unless otherwise specified above.