# Skynet LDAP backend Basic information on the Skynet ldap backend for use on ### Error: HTTP 500 No indication of the issue is returned to teh frontend. ## Routes Base URL: ### POST /ldap/update Fields: * userPassword * mail * sshPublicKey * cn * sn * skDiscord ```json { "user" : "username", "pass" : "password", "field": "field to change", "value": "new value of field" } ``` Changing ``userPassword`` requires the existing password in teh apssword field and the new one in teh value field. ### POST /ldap/new ```json { "auth" : "Authcode from the email", "user" : "username the user wants", "pass" : "password teh user wants" } ``` Username taken: ```json {"result": "error", "error": "username not available"} ``` Invalid Auth: ```json {"result": "error", "error": "Invalid auth"} ``` ## Responses Generic responses which is used unless otherwise specified above. ### POST /ldap/reset ```json { "user" : "[OPTIONAL] username looking for reset", "email" : "[OPTIONAL] email looking for reset" } ``` All responses: ```json {"result": "success"} ``` ### POST /ldap/reset/auth ```json { "auth" : "Auth key from teh email", "pass" : "Password the user chooses" } ``` Early Errors: ```json {"result": "error"} ``` LDAP error: ```json {"result": "error", "error": "ldap error"} ``` Success: ```json {"result": "success", "success": "Password set"} ``` ## Responses Generic responses which is used unless otherwise specified above. ### Success: HTTP 200 ```json { "result": "success" } ```