Fast API blueprint that implements Oauth bearer token with OAuth scopes on a "multiple files" application with API Routers.
Database is mocked as Python memory lists.
poetry install --with dev
source .venv/bin/activate
# you should save it somewhere safe, eg in a .env
export JWT_SECRET_KEY=$(openssl rand -hex 32)
uvicorn src.main:app --reloadVisit 127.0.0.1:8000/docs
- Bob authenticates (user
bob, passwordsecret) - Bob cannot manipulate items since he is
admin - Bob can create a new user
Mikewith typemanager - Bob provides to Mike the generated password
- Mike can connect and plays with his items
- Alice can only review her items
- Bob can list everyone's all items