feat: added verification for the ssh keys #42
1 changed files with 60 additions and 1 deletions
61
README.md
61
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.
|
||||
|
|
Loading…
Reference in a new issue