diff --git a/README.md b/README.md index 3c69c2e..15d2c22 100644 --- a/README.md +++ b/README.md @@ -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.