aiteamutils 0.2.18__tar.gz → 0.2.19__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/PKG-INFO +1 -1
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/config.py +24 -2
- aiteamutils-0.2.19/aiteamutils/version.py +2 -0
- aiteamutils-0.2.19/app/auth/service.py +4 -0
- aiteamutils-0.2.18/aiteamutils/version.py +0 -2
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/.gitignore +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/README.md +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/__init__.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/base_model.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/base_repository.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/base_service.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/cache.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/database.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/dependencies.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/enums.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/exceptions.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/security.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/aiteamutils/validators.py +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/pyproject.toml +0 -0
- {aiteamutils-0.2.18 → aiteamutils-0.2.19}/setup.py +0 -0
@@ -4,15 +4,28 @@ from .database import init_database_service
|
|
4
4
|
|
5
5
|
class Settings:
|
6
6
|
"""기본 설정 클래스"""
|
7
|
-
def __init__(
|
7
|
+
def __init__(
|
8
|
+
self,
|
9
|
+
jwt_secret: str,
|
10
|
+
jwt_algorithm: str = "HS256",
|
11
|
+
access_token_expire_minutes: int = 30,
|
12
|
+
token_issuer: str = "ai-team",
|
13
|
+
token_audience: str = "ai-team"
|
14
|
+
):
|
8
15
|
self.JWT_SECRET = jwt_secret
|
9
16
|
self.JWT_ALGORITHM = jwt_algorithm
|
17
|
+
self.ACCESS_TOKEN_EXPIRE_MINUTES = access_token_expire_minutes
|
18
|
+
self.TOKEN_ISSUER = token_issuer
|
19
|
+
self.TOKEN_AUDIENCE = token_audience
|
10
20
|
|
11
21
|
_settings: Union[Settings, None] = None
|
12
22
|
|
13
23
|
def init_settings(
|
14
24
|
jwt_secret: str,
|
15
25
|
jwt_algorithm: str = "HS256",
|
26
|
+
access_token_expire_minutes: int = 30,
|
27
|
+
token_issuer: str = "ai-team",
|
28
|
+
token_audience: str = "ai-team",
|
16
29
|
db_url: str = None,
|
17
30
|
db_echo: bool = False,
|
18
31
|
db_pool_size: int = 5,
|
@@ -25,6 +38,9 @@ def init_settings(
|
|
25
38
|
Args:
|
26
39
|
jwt_secret (str): JWT 시크릿 키
|
27
40
|
jwt_algorithm (str, optional): JWT 알고리즘. Defaults to "HS256".
|
41
|
+
access_token_expire_minutes (int, optional): 액세스 토큰 만료 시간(분). Defaults to 30.
|
42
|
+
token_issuer (str, optional): 토큰 발급자. Defaults to "ai-team".
|
43
|
+
token_audience (str, optional): 토큰 대상자. Defaults to "ai-team".
|
28
44
|
db_url (str, optional): 데이터베이스 URL
|
29
45
|
db_echo (bool, optional): SQL 로깅 여부
|
30
46
|
db_pool_size (int, optional): DB 커넥션 풀 크기
|
@@ -33,7 +49,13 @@ def init_settings(
|
|
33
49
|
db_pool_recycle (int, optional): 커넥션 재활용 시간
|
34
50
|
"""
|
35
51
|
global _settings
|
36
|
-
_settings = Settings(
|
52
|
+
_settings = Settings(
|
53
|
+
jwt_secret=jwt_secret,
|
54
|
+
jwt_algorithm=jwt_algorithm,
|
55
|
+
access_token_expire_minutes=access_token_expire_minutes,
|
56
|
+
token_issuer=token_issuer,
|
57
|
+
token_audience=token_audience
|
58
|
+
)
|
37
59
|
|
38
60
|
if db_url:
|
39
61
|
init_database_service(
|
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
|