implement login
This commit is contained in:
34
README.md
34
README.md
@ -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.
|
||||
|
Reference in New Issue
Block a user