aiteamutils 0.2.44__tar.gz → 0.2.46__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/PKG-INFO +1 -1
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/dependencies.py +5 -3
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/security.py +2 -2
- aiteamutils-0.2.46/aiteamutils/version.py +2 -0
- aiteamutils-0.2.44/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/.cursorrules +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/.gitignore +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/README.md +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/base_repository.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/base_service.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/config.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/aiteamutils/validators.py +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/pyproject.toml +0 -0
- {aiteamutils-0.2.44 → aiteamutils-0.2.46}/setup.py +0 -0
@@ -56,11 +56,13 @@ def get_service(name: str):
|
|
56
56
|
Returns:
|
57
57
|
Callable: 서비스 인스턴스를 반환하는 의존성 함수
|
58
58
|
"""
|
59
|
-
async def _get_service(db_service = Depends(get_database_service)):
|
59
|
+
async def _get_service(db_service = Depends(get_database_service), session = Depends(get_db)):
|
60
60
|
try:
|
61
61
|
repository_class, service_class = service_registry.get(name)
|
62
62
|
repository = repository_class(db_service)
|
63
|
-
|
63
|
+
service = service_class(repository, db_service)
|
64
|
+
service.session = session
|
65
|
+
return service
|
64
66
|
except CustomException as e:
|
65
67
|
raise e
|
66
68
|
except Exception as e:
|
@@ -95,7 +97,7 @@ async def get_current_user(
|
|
95
97
|
token,
|
96
98
|
settings.JWT_SECRET,
|
97
99
|
algorithms=[settings.JWT_ALGORITHM],
|
98
|
-
audience=
|
100
|
+
audience=settings.TOKEN_AUDIENCE
|
99
101
|
)
|
100
102
|
user_ulid = payload.get("sub")
|
101
103
|
if not user_ulid:
|
@@ -351,7 +351,7 @@ async def create_jwt_token(
|
|
351
351
|
token_data = {
|
352
352
|
# 등록 클레임
|
353
353
|
"iss": settings.TOKEN_ISSUER,
|
354
|
-
"sub": user_data["
|
354
|
+
"sub": user_data["ulid"],
|
355
355
|
"aud": settings.TOKEN_AUDIENCE,
|
356
356
|
"exp": expires_at,
|
357
357
|
|
@@ -376,7 +376,7 @@ async def create_jwt_token(
|
|
376
376
|
expires_at = datetime.now(UTC) + timedelta(days=14)
|
377
377
|
token_data = {
|
378
378
|
"iss": settings.TOKEN_ISSUER,
|
379
|
-
"sub": user_data["
|
379
|
+
"sub": user_data["ulid"],
|
380
380
|
"exp": expires_at,
|
381
381
|
"token_type": token_type,
|
382
382
|
"user_ulid": user_data["ulid"]
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|