Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
zopyx committed May 24, 2024
1 parent 45574f3 commit 5b8ada1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions fastapi_auth/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
from .permissions import Permission
from .logger import LOG

class Unauthorized(Exception):
""" """


def get_user(request: Request) -> User:
"""This dependency return either an authenticated user depending on the
Expand Down
2 changes: 2 additions & 0 deletions fastapi_auth/user_management_sqlobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from .auth_config import AUTH_SETTINGS
from .roles import ROLES_REGISTRY
from .logger import LOG

# AuthUser is an alias in order to avoid name clash with the SQLModel User class below
from .users import User as AuthUser
Expand All @@ -32,6 +33,7 @@ class UserManagement:

@typechecked
def __init__(self, db_uri: str) -> None:
LOG.info(f"Connecting to database {db_uri}")
self.engine = create_engine(db_uri)
SQLModel.metadata.create_all(self.engine)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[project]
name = "zopyx-fastapi-auth"
description = "FastAPI authentication and authorization"
version = "0.2.2.3"
version = "0.2.2.4"
readme = "README.md"
authors = [
{ name = "Andreas Jung", email = "info@zopyx.com" }
Expand Down

0 comments on commit 5b8ada1

Please sign in to comment.