No description
Find a file
2023-08-13 15:02:33 +01:00
src feat: when a user adds a mail and is not already a member of skynet-users it check if they have paid up and then activates them. 2023-08-13 15:02:33 +01:00
.gitignore feat: add proper env vars for home and the csv 2023-07-17 01:24:52 +01:00
.gitlab-ci.yml ci: should deal with nestled folders now? 2023-08-11 08:28:36 +01:00
.rustfmt.toml fmt: updated rust format 2023-07-29 17:23:05 +01:00
Cargo.lock pkg: newer dotenv 2023-07-29 22:23:20 +01:00
Cargo.toml ci: should deal with nestled folders now? 2023-08-11 08:28:36 +01:00
flake.lock feat: packed up server as a flake 2023-06-18 20:46:02 +01:00
flake.nix fix: groups are now updated every 8 hours 2023-08-06 14:27:24 +01:00
README.md Update file README.md 2023-08-07 17:30:41 +00:00

Skynet LDAP backend

Basic information on the Skynet ldap backend for use on https://account.skynet.ie

Error: HTTP 500

No indication of the issue is returned to teh frontend.

Routes

Base URL: https://api.account.skynet.ie

POST /ldap/update

Fields:

  • userPassword
  • mail
  • sshPublicKey
  • cn
  • sn
  • skDiscord
{ 
  "user" : "username", 
  "pass" : "password",
  "field": "field to change",
  "value": "new value of field"
}

Success:
Each value is either a string or null.

{
  "result": "success",
  "success": {
    "cn": "Firstname Surname",
    "mail": "Email address",
    "skDiscord": null, 
    "sshPublicKey": "ssh key"
  }
}

Changing userPassword requires the existing password in teh apssword field and the new one in teh value field.

POST /ldap/new/email

Kickstarts teh process of signing up to Skynet

{ 
  "email" : "User's wolves email"
}

POST /ldap/new/account

Verifies teh user has access to this email

{ 
  "auth" : "Authcode from the email",
  "user" : "username the user wants", 
  "pass" : "password teh user wants"
}

Username taken:

{"result": "error", "error": "username not available"}

Invalid Auth:

{"result": "error", "error": "Invalid auth"}

Responses

Generic responses which is used unless otherwise specified above.

POST /ldap/recover/password

{
  "user" : "[OPTIONAL] username looking for reset",
  "email" : "[OPTIONAL] email looking for reset"
}

All responses:

{"result": "success"}

POST /ldap/recover/password/auth

{ 
  "auth" : "Auth key from teh email",
  "pass" : "Password the user chooses"
}

Early Errors:

{"result": "error"}

LDAP error:

{"result": "error", "error": "ldap error"}

Success:

{"result": "success", "success": "Password set"}

Responses

Generic responses which is used unless otherwise specified above.

Success: HTTP 200

{
    "result": "success"
}