Update auth.py
Browse files
auth.py
CHANGED
@@ -9,13 +9,14 @@ from passlib.context import CryptContext
|
|
9 |
from datetime import datetime, timedelta
|
10 |
|
11 |
|
12 |
-
|
13 |
class AuthViews:
|
14 |
def __init__(self):
|
15 |
self.pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
16 |
self.SECRET_KEY = "your-secret-key" # Replace with your actual secret key
|
17 |
self.ALGORITHM = "HS256"
|
18 |
self.ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
|
|
19 |
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
|
20 |
|
21 |
def verify_token(token: str = Depends(oauth2_scheme)):
|
|
|
9 |
from datetime import datetime, timedelta
|
10 |
|
11 |
|
12 |
+
|
13 |
class AuthViews:
|
14 |
def __init__(self):
|
15 |
self.pwd_context = CryptContext(schemes=["bcrypt"], deprecated="auto")
|
16 |
self.SECRET_KEY = "your-secret-key" # Replace with your actual secret key
|
17 |
self.ALGORITHM = "HS256"
|
18 |
self.ACCESS_TOKEN_EXPIRE_MINUTES = 30
|
19 |
+
auth_views = AuthViews()
|
20 |
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
|
21 |
|
22 |
def verify_token(token: str = Depends(oauth2_scheme)):
|