No description
Find a file
Brendan Golden ae7b73176c Merge branch '#10_wolves_database' into 'main'
feat: added the function to get teh data and updated teh times tehy run at

See merge request compsoc1/skynet/ldap/backend!8
2023-08-05 21:36:30 +00:00
src feat: will now get the ldap data at the same time 2023-08-05 22:05:44 +01:00
.gitignore feat: add proper env vars for home and the csv 2023-07-17 01:24:52 +01:00
.gitlab-ci.yml fix: renamed to make room for teh compsoc repo 2023-07-30 14:08:54 +00: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 feat: will now get the ldap data at the same time 2023-08-05 22:05:44 +01:00
flake.lock feat: packed up server as a flake 2023-06-18 20:46:02 +01:00
flake.nix feat: added the function to get teh data and updated teh times tehy run at 2023-08-05 22:27:54 +01:00
README.md feat: returns the user details on successful account modification 2023-08-05 17:36:48 +01:00

Skynet LDAP backend

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

Error: HTTP 500

No indication of the issue is returned to teh frontend.

Routes

Base URL: https://api.sso.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

{ 
  "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.

Success: HTTP 200

{
    "result": "success"
}