A minimal authenticated Django API for HawkScan authentication testing.
This app has been tested with Python 3.9.1 To install Python module prerequisites, run:
$ cd hawkling-api
$ pip3 install -r requirements.txtCreate your Django secret key and store in an environment file
$ cd hawklingAPI/hawlingAPI/hawklingAPI
$ touch .env
$ echo DJANGO_KEY=$(python -c "import secrets; print(secrets.token_urlsafe())") >> .envTo run the API service directly, run:
$ cd ..
$ python manage.py runserverThe API service will listen on 0.0.0.0 and port 8000. You can reach the app at http://localhost:8000/.
| Action | Path | Route Type | Details | 
|---|---|---|---|
| GET | / | public | Hawkling API home | 
| POST | login/ | public | Login accepts username/password and returns JWT token | 
| GET | kaakaww/ | protected | Requires Bearer token to display greeting | 
- username: admin
 - password: adminpassword