aboutsummaryrefslogtreecommitdiff
path: root/README
blob: 67be1905a3ff3d005a4454e6c71928c87c9b2d41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# weblogin

This is a small flask webserver that returns a JSON web token for form
requests at /auth, submitted by a user of the /login.html page.
A GET request to /logout will remove the JSON web token cookie (the
cookie auth is used for storage).

## Requirements

- Python 3
- flask
- passlib
- python-jwt

## License

Licensed under the MIT license.
It just isn't a big enough piece of software to justify anything
more restrictive.

## Hello World

To try the code out yourself,
install the `nginx.example.conf` as /etc/nginx/nginx.conf and
install the `src/login.html`

```sh
systemctl enable --now nginx
python src/login.py webpass test.pem
```
Now connect to localhost, and the username is hr and the password is
soupsoup.

## Other stuff around here

`weblogin.ini` is an ini file for compatibility with uwsgi that should
help making that setup easier if you plan to use uwsgi.
And the Makefile and the specfile are for building an RPM for Fedora
(may also work on CentOS/RHEL).
To use those, you need some make program and rpmbuild installed.
I might publish the RPM at some point.