ldap_backend/README.md

62 lines
1,017 B
Markdown
Raw Normal View History

2023-07-23 21:24:03 +00: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
```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
{
2023-07-30 01:50:13 +00:00
"auth" : "Authcode from the email",
2023-07-23 21:24:03 +00:00
"user" : "username the user wants",
2023-07-30 01:50:13 +00:00
"pass" : "password teh user wants"
2023-07-23 21:24:03 +00:00
}
```
2023-07-30 01:50:13 +00:00
Username taken:
2023-07-23 21:24:03 +00:00
```json
{"result": "error", "error": "username not available"}
```
2023-07-30 01:50:13 +00:00
Invalid Auth:
2023-07-23 21:24:03 +00:00
```json
2023-07-30 01:50:13 +00:00
{"result": "error", "error": "Invalid auth"}
2023-07-23 21:24:03 +00:00
```
## Responses
Generic responses which is used unless otherwise specified above.
### Success: HTTP 200
```json
{
"result": "success"
}
```