Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic auth functionality #2

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

AlessandroMiola
Copy link
Owner

@AlessandroMiola AlessandroMiola commented Mar 29, 2024

Summary:

  • 165cfbe:

    • basic_auth/src/apis/api.py: add fastapi router for basic auth functionalities
    • basic_auth/src/models/user.py: add sqlmodel models for users' management
    • basic_auth/src/apis/utils/authenticate.py: add autenthication utility
    • basic_auth/src/apis/utils/security.py: add utility to hash passwords and get hashed passwords
    • basic_auth/src/apis/v1/routes.py: add /basic/register and /basic/login routes
    • basic_auth/src/crud/user.py: add sqlmodel-friendly crud operations (create and get)
    • basic_auth/src/db/session.py: add get_session dependency
    • basic_auth/src/alembic.ini: modify prepend_sys_path config to make modules visible to alembic (given the project tree structure)
    • basic_auth/src/alembic/script.py.mako: modify autogenerated script to make it sqlmodel-compatible and ruff-compliant (wrt py3.10). Cues from https://github.com/tiangolo/full-stack-fastapi-template/blob/master/backend/app/alembic/script.py.mako.
    • basic_auth/src/alembic/env.py: modify target_metadata config to make it sqlmodel-compatible
    • basic_auth/src/alembic/...: add scripts for db migrations
    • config.py: add utility to read environment variables by means of pydantic-settings rather than the usual python-dotenv or environs
    • docker-compose.yaml: add docker-compose to retrieve a postgresql image and start an instance
    • pyproject.toml: update ruff config, add packages to install
  • 864ded9:

  • 0d49229: merge 'origin/main' into basic_auth

  • 28d5f43: (will need a dedicated section in the docs - as soon as I add them); the following require, at least, the ownership of self-signed certificates

    • docker-compose.yaml: add configuration to retrieve a nginx image and start an instance; setup volumes in such a way to provide SSL/TLS certificates to Nginx for enabling HTTPS
    • nginx/nginx.conf: add configuration file for nginx
    • config.py: add reference to the NGINX_PORT environment variable

⚠️ TODO:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant