aiteamutils 0.2.78__py3-none-any.whl → 0.2.79__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
aiteamutils/security.py
CHANGED
@@ -1,19 +1,17 @@
|
|
1
1
|
"""보안 관련 유틸리티."""
|
2
2
|
from datetime import datetime, timedelta, timezone
|
3
|
-
from typing import Dict, Any, Optional, Literal, Callable, TYPE_CHECKING, TypeVar
|
3
|
+
from typing import Dict, Any, Optional, Literal, Callable, TYPE_CHECKING, TypeVar
|
4
4
|
from fastapi import Request, HTTPException, status
|
5
5
|
from functools import wraps
|
6
6
|
from jose import jwt, JWTError
|
7
7
|
from passlib.context import CryptContext
|
8
8
|
import logging
|
9
9
|
from sqlalchemy.ext.asyncio import AsyncSession
|
10
|
-
from sqlalchemy.orm import DeclarativeBase
|
11
10
|
from .exceptions import CustomException, ErrorCode
|
12
11
|
from .enums import ActivityType
|
13
|
-
from .database import log_create
|
14
12
|
|
15
13
|
pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
16
|
-
ModelType = TypeVar("ModelType"
|
14
|
+
ModelType = TypeVar("ModelType")
|
17
15
|
|
18
16
|
# 전역 rate limit 상태 저장
|
19
17
|
_rate_limits: Dict[str, Dict[str, Any]] = {}
|
@@ -134,7 +132,7 @@ def rate_limit(
|
|
134
132
|
return decorator
|
135
133
|
|
136
134
|
async def create_jwt_token(
|
137
|
-
user_data:
|
135
|
+
user_data: Optional[ModelType],
|
138
136
|
token_type: Literal["access", "refresh"],
|
139
137
|
db_session: AsyncSession,
|
140
138
|
token_settings: Dict[str, Any],
|
aiteamutils/version.py
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
"""버전 정보"""
|
2
|
-
__version__ = "0.2.
|
2
|
+
__version__ = "0.2.79"
|
@@ -7,9 +7,9 @@ aiteamutils/config.py,sha256=YdalpJb70-txhGJAS4aaKglEZAFVWgfzw5BXSWpkUz4,3232
|
|
7
7
|
aiteamutils/database.py,sha256=Q2rwVfhS8Rpnj89EwtcLtmsDpANkJ1AlprlqQsgIQAg,19204
|
8
8
|
aiteamutils/enums.py,sha256=ipZi6k_QD5-3QV7Yzv7bnL0MjDz-vqfO9I5L77biMKs,632
|
9
9
|
aiteamutils/exceptions.py,sha256=3FUCIqXgYmMqonnMgUlh-J2xtApiiCgg4WM-2UV4vmQ,15823
|
10
|
-
aiteamutils/security.py,sha256=
|
10
|
+
aiteamutils/security.py,sha256=dPprEiKZ_VCg9bf27OaBvWw5SMBb_V0KGajIbgIbejs,9661
|
11
11
|
aiteamutils/validators.py,sha256=PvI9hbMEAqTawgxPbiWRyx2r9yTUrpNBQs1AD3w4F2U,7726
|
12
|
-
aiteamutils/version.py,sha256=
|
13
|
-
aiteamutils-0.2.
|
14
|
-
aiteamutils-0.2.
|
15
|
-
aiteamutils-0.2.
|
12
|
+
aiteamutils/version.py,sha256=CzBQOXpe_-RfEDV4RvVHykuSQFo8eYW1g0gu7UOhJ-E,42
|
13
|
+
aiteamutils-0.2.79.dist-info/METADATA,sha256=pQkGcF9V5M-cOJKyAYJsCYyYe5DnCDQhmqh36G30vb4,1718
|
14
|
+
aiteamutils-0.2.79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
15
|
+
aiteamutils-0.2.79.dist-info/RECORD,,
|
File without changes
|