No description
49bf65abe5
Fix: update email to explain more about Skynet/Compsoc Closes #9 See merge request compsoc1/skynet/ldap/backend!7 |
||
---|---|---|
src | ||
.gitignore | ||
.gitlab-ci.yml | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
flake.lock | ||
flake.nix | ||
README.md |
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
- 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"
}