From f8be6bf3fea063dc1a79442dd7460c2e4060f7dd Mon Sep 17 00:00:00 2001 From: Leo VIALLON-GALINIER Date: Thu, 17 Jan 2019 19:36:11 +0100 Subject: [PATCH] Add Readme file --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..af3219a --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# SAuth : a simple auth add-on for bottle + +SAuth is a simple package to make authentification on bottle websites. It is inspired from [cork](http://cork.firelet.net) but much more simple. It provides an authentification class, and a decorator. + +The package is written for python3. It depends only on `bottle` and `hashlib`. + +It allows filtering access by role and user. + +## Storing users + +The class is not specific of a storing method as it call a backend for authentification. Currently only the JSON backend is written, so it is the default one. Users are stored in a JSON file (by default `users/users.json`) whereas available roles are stored in `users/roles.json`. + +## Getting startd +An example is proposed. You have to create a `sessions` folder to allow bottle to manage sessions. Then, just run `example.py`. + +The `adduser.py` routine allow to create users and save into the users JSON file. The example users file contains two users : `user` with password `user` and `admin` with password `admin`. + +To use in your project, just copy the `sauth` folder into your project directory !