From a073fa5962bfbfb60bb24ac7f5cab7fdec6e748e Mon Sep 17 00:00:00 2001 From: Zayden Jung Date: Tue, 19 May 2026 22:56:04 +0800 Subject: [PATCH] pyjwt not jwt --- auth/jwt.py | 2 +- pyproject.toml | 2 +- uv.lock | 30 ++++++++++++++++-------------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/auth/jwt.py b/auth/jwt.py index 76abfb7..c955d31 100644 --- a/auth/jwt.py +++ b/auth/jwt.py @@ -1,6 +1,6 @@ from datetime import datetime, timedelta, timezone import os -import auth.jwt as jwt +import jwt from fastapi import HTTPException, status JWT_SECRET = os.getenv("JWT_SECRET") diff --git a/pyproject.toml b/pyproject.toml index 42028ba..18e246e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,9 +10,9 @@ dependencies = [ "dotenv>=0.9.9", "fastapi>=0.136.1", "httpx>=0.28.1", - "jwt>=1.4.0", "oss2>=2.19.1", "psycopg2-binary>=2.9.12", + "pyjwt[crypto]>=2.12.1", "python-jose>=3.5.0", "sqlalchemy>=2.0.49", "strawberry-graphql[fastapi]>=0.315.5", diff --git a/uv.lock b/uv.lock index 2c9dfc7..ec56abb 100644 --- a/uv.lock +++ b/uv.lock @@ -148,9 +148,9 @@ dependencies = [ { name = "dotenv" }, { name = "fastapi" }, { name = "httpx" }, - { name = "jwt" }, { name = "oss2" }, { name = "psycopg2-binary" }, + { name = "pyjwt", extra = ["crypto"] }, { name = "python-jose" }, { name = "sqlalchemy" }, { name = "strawberry-graphql", extra = ["fastapi"] }, @@ -165,9 +165,9 @@ requires-dist = [ { name = "dotenv", specifier = ">=0.9.9" }, { name = "fastapi", specifier = ">=0.136.1" }, { name = "httpx", specifier = ">=0.28.1" }, - { name = "jwt", specifier = ">=1.4.0" }, { name = "oss2", specifier = ">=2.19.1" }, { name = "psycopg2-binary", specifier = ">=2.9.12" }, + { name = "pyjwt", extras = ["crypto"], specifier = ">=2.12.1" }, { name = "python-jose", specifier = ">=3.5.0" }, { name = "sqlalchemy", specifier = ">=2.0.49" }, { name = "strawberry-graphql", extras = ["fastapi"], specifier = ">=0.315.5" }, @@ -434,18 +434,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/07/cb/5f001272b6faeb23c1c9e0acc04d48eaaf5c862c17709d20e3469c6e0139/jmespath-0.10.0-py2.py3-none-any.whl", hash = "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f", size = 24489, upload-time = "2020-05-12T22:03:45.643Z" }, ] -[[package]] -name = "jwt" -version = "1.4.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "cryptography" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7f/20/21254c9e601e6c29445d1e8854c2a81bdb554e07a82fb1f9846137a6965c/jwt-1.4.0.tar.gz", hash = "sha256:f6f789128ac247142c79ee10f3dba6e366ec4e77c9920d18c1592e28aa0a7952", size = 24911, upload-time = "2025-06-23T13:28:38.289Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b9/80/34e3fae850adb0b7b8b9b1cf02b2d975fcb68e0e8eb7d56d6b4fc23f7433/jwt-1.4.0-py3-none-any.whl", hash = "sha256:7560a7f1de4f90de94ac645ee0303ac60c95b9e08e058fb69f6c330f71d71b11", size = 18248, upload-time = "2025-06-23T13:28:37.012Z" }, -] - [[package]] name = "mako" version = "1.3.12" @@ -623,6 +611,20 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f6/d2/42dd53d0a85c27606f316d3aa5d2869c4e8470a5ed6dec30e4a1abe19192/pydantic_core-2.46.4-cp314-cp314t-win_arm64.whl", hash = "sha256:4fcbe087dbc2068af7eda3aa87634eba216dbda64d1ae73c8684b621d33f6596", size = 2017325, upload-time = "2026-05-06T13:40:52.723Z" }, ] +[[package]] +name = "pyjwt" +version = "2.12.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c2/27/a3b6e5bf6ff856d2509292e95c8f57f0df7017cf5394921fc4e4ef40308a/pyjwt-2.12.1.tar.gz", hash = "sha256:c74a7a2adf861c04d002db713dd85f84beb242228e671280bf709d765b03672b", size = 102564, upload-time = "2026-03-13T19:27:37.25Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e5/7a/8dd906bd22e79e47397a61742927f6747fe93242ef86645ee9092e610244/pyjwt-2.12.1-py3-none-any.whl", hash = "sha256:28ca37c070cad8ba8cd9790cd940535d40274d22f80ab87f3ac6a713e6e8454c", size = 29726, upload-time = "2026-03-13T19:27:35.677Z" }, +] + +[package.optional-dependencies] +crypto = [ + { name = "cryptography" }, +] + [[package]] name = "python-dateutil" version = "2.9.0.post0"