Authentication API
Read the full documentation of this authentication backend in the FastSurvey documentation:
docs.fastsurvey.io/docs/authentication/api-keys-vs-oauth2
Run locally
- We are using the
RS256
algorithm. To generate a key pair, run:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
- Inside your desired python environment run:
pip install poetry
poetry install
- Run all tests with coverage report with:
pytest --cov=app --cov-report=term-missing --cov-report=xml ./tests
- Run the app without Docker ...
uvicorn app:app --host 0.0.0.0 --port 8080 --env-file .env
... or with Docker:
docker build -t <image-name> .
# Set all required env variables here
docker run -d -p 8080:8080 --env-file .env <image-name>