Few fixes
This commit is contained in:
@@ -3,7 +3,7 @@ uLuforecasting service configuration
|
||||
"""
|
||||
|
||||
import os
|
||||
from pydantic import BaseSettings
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
class Settings(BaseSettings):
|
||||
"""Application settings"""
|
||||
|
||||
0
services/forecasting/app/models/__init__.py
Normal file
0
services/forecasting/app/models/__init__.py
Normal file
@@ -3,7 +3,7 @@ Shared JWT Authentication Handler
|
||||
Used across all microservices for consistent authentication
|
||||
"""
|
||||
|
||||
import jwt
|
||||
from jose import jwt
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Optional, Dict, Any
|
||||
import logging
|
||||
@@ -53,6 +53,6 @@ class JWTHandler:
|
||||
except jwt.ExpiredSignatureError:
|
||||
logger.warning("Token has expired")
|
||||
return None
|
||||
except jwt.InvalidTokenError:
|
||||
except jwt.JWTError:
|
||||
logger.warning("Invalid token")
|
||||
return None
|
||||
Reference in New Issue
Block a user