aiteamutils 0.2.76__tar.gz → 0.2.77__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/PKG-INFO +1 -1
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/security.py +12 -11
- aiteamutils-0.2.77/aiteamutils/version.py +2 -0
- aiteamutils-0.2.76/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/.cursorrules +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/.gitignore +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/README.md +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/base_repository.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/base_service.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/config.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/aiteamutils/validators.py +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/pyproject.toml +0 -0
- {aiteamutils-0.2.76 → aiteamutils-0.2.77}/setup.py +0 -0
@@ -207,19 +207,18 @@ async def create_jwt_token(
|
|
207
207
|
|
208
208
|
async def verify_jwt_token(
|
209
209
|
token: str,
|
210
|
-
expected_type: Optional[Literal["access", "refresh"]] = None
|
210
|
+
expected_type: Optional[Literal["access", "refresh"]] = None,
|
211
|
+
token_settings: Dict[str, Any] = None
|
211
212
|
) -> Dict[str, Any]:
|
212
213
|
"""JWT 토큰을 검증합니다."""
|
213
214
|
try:
|
214
|
-
settings = get_settings()
|
215
|
-
|
216
215
|
# 토큰 디코딩
|
217
216
|
payload = jwt.decode(
|
218
217
|
token,
|
219
|
-
|
220
|
-
algorithms=[
|
221
|
-
audience=
|
222
|
-
issuer=
|
218
|
+
token_settings["JWT_SECRET"],
|
219
|
+
algorithms=[token_settings["JWT_ALGORITHM"]],
|
220
|
+
audience=token_settings["TOKEN_AUDIENCE"],
|
221
|
+
issuer=token_settings["TOKEN_ISSUER"]
|
223
222
|
)
|
224
223
|
|
225
224
|
# 토큰 타입 검증
|
@@ -257,14 +256,16 @@ async def verify_jwt_token(
|
|
257
256
|
original_error=e
|
258
257
|
)
|
259
258
|
|
260
|
-
def validate_token(
|
259
|
+
def validate_token(
|
260
|
+
token: str,
|
261
|
+
token_settings: Dict[str, Any] = None
|
262
|
+
) -> Dict[str, Any]:
|
261
263
|
"""JWT 토큰을 검증하고 페이로드를 반환합니다."""
|
262
264
|
try:
|
263
|
-
settings = get_settings()
|
264
265
|
payload = jwt.decode(
|
265
266
|
token,
|
266
|
-
|
267
|
-
algorithms=[
|
267
|
+
token_settings["JWT_SECRET"],
|
268
|
+
algorithms=[token_settings["JWT_ALGORITHM"]]
|
268
269
|
)
|
269
270
|
return payload
|
270
271
|
except JWTError as e:
|
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
|