implement login

This commit is contained in:
2021-06-12 13:24:26 +02:00
parent 3920183e0c
commit c33c08fe0a
10 changed files with 134 additions and 14 deletions

View File

@ -11,15 +11,47 @@
```
cp env.dev .env
pipenv install
pipenv install --dev
pipenv shell
export FLASK_APP=app.py
flask db upgrade
flask seed
flask run
```
http://localhost:5000/
### Testbenutzer
Für ein Login ohne LDAP werden die Benutzer aus der [`auth.yml`](./data/auth.yml) benutzt.
### Test-Requests
Beispiele brauchen curl und jq.
```
curl -s \
-D "/dev/stderr" \
http://localhost:5000/skills?search=ph | jq
```
```
curl -s \
-D "/dev/stderr" \
http://localhost:5000/languages?search=fr | jq
```
```
curl -s \
-D "/dev/stderr" \
-X POST \
-H "Content-Type: application/json" \
-d '{"username": "peter", "password": "geheim"}' \
http://localhost:5000/users/login | jq
```
### Produktionsumgebung
Für die Produktionsumgebung wird [waitress](https://docs.pylonsproject.org/projects/waitress/en/latest/) benutzt.