Go to file
antifallobst cc2e6080f4
docs(readme): documented API and CLI
2023-08-12 15:33:41 +02:00
doc initial commit 2023-08-11 22:45:35 +02:00
src feat(api,backend): added a dummy backend, improved internal response handling and documented api http response codes 2023-08-12 14:41:28 +02:00
.gitignore initial commit 2023-08-11 22:45:35 +02:00
Cargo.lock feat(api): added json body deserialization to the api endpoints 2023-08-12 13:50:20 +02:00
Cargo.toml feat(api): added json body deserialization to the api endpoints 2023-08-12 13:50:20 +02:00
LICENSE initial commit 2023-08-11 22:45:35 +02:00
README.md docs(readme): documented API and CLI 2023-08-12 15:33:41 +02:00

README.md

BaseAuth

Baseauth is a simple auth server, which is not meant to be usable in production environments.


API

The API runs uses HTTP and runs by default on port 8080. All requests to endpoints are POST. The Content-Type is always application/json, so all payloads are JSON strings.

endpoints

/register

Registers a new account.

Content / Payload

Field Description
username The username of the account
password The accounts' clear text password

Responses

| Response | Description | |----------|-----------------------------------------| | 200 | User created successfully | | 400 | Formal error in the request | | 409 | The requested username is already in use | | 500 | Internal server error |

/authenticate

Authenticates using an existing account.

Payload

Field Description
username The username of the account
password The accounts' clear text password

Responses

| Response | Description | |----------|---------------------------------------------------| | 200 | Authenticated successfully | | 400 | Formal error in the request | | 401 | Authentication failure (wrong password) | | 404 | There was no account found with the specified name | | 500 | Internal server error |


CLI

Arguments

Argument Description
`-D --daemon`
`-d --delete `
`-w --dir `