add jwt check

This commit is contained in:
IluaAir
2025-08-17 12:55:41 +03:00
parent 4104dd7e15
commit 340c3e1077
4 changed files with 22 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
from src.core.auth_manager import AuthManager
async def test_jwt():
token = AuthManager.create_access_token(data={"id": 1, "sub": "testuser", "is_active": "True"})
assert token
encode_token = AuthManager.decode_access_token(token=token)
assert encode_token['id'] == 1 and encode_token['sub'] == 'testuser'