aiteamutils 0.2.44__py3-none-any.whl → 0.2.46__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- aiteamutils/dependencies.py +5 -3
- aiteamutils/security.py +2 -2
- aiteamutils/version.py +1 -1
- {aiteamutils-0.2.44.dist-info → aiteamutils-0.2.46.dist-info}/METADATA +1 -1
- {aiteamutils-0.2.44.dist-info → aiteamutils-0.2.46.dist-info}/RECORD +6 -6
- {aiteamutils-0.2.44.dist-info → aiteamutils-0.2.46.dist-info}/WHEEL +0 -0
aiteamutils/dependencies.py
CHANGED
@@ -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:
|
aiteamutils/security.py
CHANGED
@@ -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"]
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.46"
|
@@ -5,12 +5,12 @@ aiteamutils/base_service.py,sha256=E4dHGE0DvhmRyFplh46SwKJOSF_nUL7OAsCkf_ZJF_8,2
|
|
5
5
|
aiteamutils/cache.py,sha256=07xBGlgAwOTAdY5mnMOQJ5EBxVwe8glVD7DkGEkxCtw,1373
|
6
6
|
aiteamutils/config.py,sha256=OM_b7g8sqZ3zY_DSF9ry-zn5wn4dlXdx5OhjfTGr0TE,2876
|
7
7
|
aiteamutils/database.py,sha256=PZOggFB8KfkoCxzHhP5GGeBjee-FM6Hr_no8c7uhAMU,40129
|
8
|
-
aiteamutils/dependencies.py,sha256=
|
8
|
+
aiteamutils/dependencies.py,sha256=5thwIWSEMTEQVTchh0GKb4R9zp_2l5ndp1UcIeHNRJ0,4426
|
9
9
|
aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
|
10
10
|
aiteamutils/exceptions.py,sha256=_lKWXq_ujNj41xN6LDE149PwsecAP7lgYWbOBbLOntg,15368
|
11
|
-
aiteamutils/security.py,sha256=
|
11
|
+
aiteamutils/security.py,sha256=KSZf3WJAlW0UXVM1GEHwuGy2x27UHwtMr8aq-GuIXZk,16016
|
12
12
|
aiteamutils/validators.py,sha256=3N245cZFjgwtW_KzjESkizx5BBUDaJLbbxfNO4WOFZ0,7764
|
13
|
-
aiteamutils/version.py,sha256=
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
16
|
-
aiteamutils-0.2.
|
13
|
+
aiteamutils/version.py,sha256=XFXbPLB5U50FoKWMU59F15d-62BCu1k0wvKYNUZHDFk,42
|
14
|
+
aiteamutils-0.2.46.dist-info/METADATA,sha256=sfCXXCOOOHxx5hfRgLROi9ePXoOVZIhhsWQ22w1gZuY,1718
|
15
|
+
aiteamutils-0.2.46.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
16
|
+
aiteamutils-0.2.46.dist-info/RECORD,,
|
File without changes
|