From ca534003b3f07d2045dc1cbb6cddf60223fd3385 Mon Sep 17 00:00:00 2001 From: Holden Rohrer Date: Fri, 12 May 2023 21:47:54 -0400 Subject: initial commit --- README | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 README (limited to 'README') diff --git a/README b/README new file mode 100644 index 0000000..67be190 --- /dev/null +++ b/README @@ -0,0 +1,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. -- cgit