Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

dostuffthatmatters/authentication-backend

Repository files navigation

Maintainability Test Coverage

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

  1. We are using the RS256 algorithm. To generate a key pair, run:
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
  1. Inside your desired python environment run:
pip install poetry
poetry install
  1. Run all tests with coverage report with:
pytest --cov=app --cov-report=term-missing --cov-report=xml ./tests
  1. 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>