auth support

This commit is contained in:
2019-09-11 02:51:55 +03:00
parent 39be8cebf1
commit 7de6a5fcc9
21 changed files with 471 additions and 14 deletions

View File

@ -71,6 +71,34 @@ Service which allows to manage savage loot distribution easy.
* `is_tome`: is item tome gear or not, bool, required.
* `piece`: item name, string, required.
### Users API
* `DELETE /api/v1/login/{username}`
Delete user with specified username. Parameters:
* `username`: username to remove, required.
* `POST /api/v1/login`
Login with credentials. Parameters:
* `username`: username to login, string, required.
* `password`: password to login, string, required.
* `PUT /api/v1/login`
Create new user. Parameters:
* `username`: username to login, string, required.
* `password`: password to login, string,
* `permission`: user permission, one of `get`, `post`, optional, default `get`.
* `POST /api/v1/logout`
Logout.
## Configuration
@ -93,6 +121,14 @@ Service which allows to manage savage loot distribution easy.
* `xivapi_key`: xivapi developer key, string, optional.
* `xivapi_url`: xivapi base url, string, required.
* `auth` section
Authentication settings.
* `enabled`: whether authentication enabled or not, boolean, required.
* `root_username`: username of administrator, string, required.
* `root_password`: md5 hashed password of administrator, string, required.
* `sqlite` section
Database settings for `sqlite` provider.