Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
419598220a | ||
|
|
565dc5f710 | ||
|
|
4078295ea9 | ||
|
|
6b5cbc722f |
+4
-3
@@ -3,9 +3,10 @@
|
||||
from datetime import datetime, timedelta
|
||||
from typing import Optional
|
||||
|
||||
import jwt
|
||||
from fastapi import Depends, HTTPException, status
|
||||
from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
|
||||
from jose import JWTError, jwt
|
||||
from jwt import PyJWTError
|
||||
from sqlalchemy.orm import Session
|
||||
|
||||
from app.database import get_db
|
||||
@@ -56,7 +57,7 @@ def verify_mfa_token(token: str) -> str:
|
||||
detail="Invalid MFA token.",
|
||||
)
|
||||
return username
|
||||
except JWTError:
|
||||
except PyJWTError:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="MFA token expired or invalid.",
|
||||
@@ -95,7 +96,7 @@ def get_current_user(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="Invalid token payload.",
|
||||
)
|
||||
except JWTError:
|
||||
except PyJWTError:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_401_UNAUTHORIZED,
|
||||
detail="Invalid or expired token.",
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ logger = logging.getLogger(__name__)
|
||||
app = FastAPI(
|
||||
title="NetBird MSP Appliance",
|
||||
description="Multi-tenant NetBird management platform for MSPs",
|
||||
version="1.6.0",
|
||||
version="1.6.2",
|
||||
docs_url="/api/docs",
|
||||
redoc_url="/api/redoc",
|
||||
openapi_url="/api/openapi.json",
|
||||
|
||||
+9
-9
@@ -5,24 +5,24 @@ sqlalchemy==2.0.23
|
||||
aiosqlite==0.19.0
|
||||
pydantic==2.5.2
|
||||
pydantic-settings==2.1.0
|
||||
python-jose[cryptography]==3.3.0
|
||||
PyJWT==2.15.1
|
||||
passlib[bcrypt]==1.7.4
|
||||
bcrypt==4.1.2
|
||||
cryptography==41.0.7
|
||||
python-multipart==0.0.6
|
||||
httpx==0.26.0
|
||||
jinja2==3.1.2
|
||||
cryptography==50.0.0
|
||||
python-multipart==0.0.31
|
||||
httpx==0.28.1
|
||||
jinja2==3.1.6
|
||||
docker==7.0.0
|
||||
requests<2.32.0
|
||||
urllib3<2
|
||||
psutil==5.9.7
|
||||
pyyaml==6.0.1
|
||||
msal==1.28.0
|
||||
msal==1.39.0
|
||||
pyotp==2.9.0
|
||||
qrcode[pil]==7.4.2
|
||||
slowapi==0.1.9
|
||||
pywinrm>=0.4.3
|
||||
ldap3>=2.9.1
|
||||
pytest==7.4.3
|
||||
pytest-asyncio==0.23.2
|
||||
pytest-httpx==0.28.0
|
||||
pytest==9.0.3
|
||||
pytest-asyncio==1.4.0
|
||||
pytest-httpx==0.36.2
|
||||
|
||||
Reference in New Issue
Block a user