Skip to content

Commit

Permalink
Merge pull request #107 from AlmaLinux/move-to-pyjwt
Browse files Browse the repository at this point in the history
Move from python-jose to pyjwt
  • Loading branch information
Korulag authored Sep 24, 2024
2 parents d5b31d9 + 0271a57 commit 7cb7683
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.celery
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN <<EOT
set -ex
python3 -m venv /root/ansible_env
source /root/ansible_env/bin/activate
pip3 install -r celery.txt ansible-core==2.12.10
pip3 install -r celery.txt ansible-core==2.15.12
EOT

RUN <<EOT
Expand Down
4 changes: 2 additions & 2 deletions alts/scheduler/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import urllib.parse
from threading import Event

import jwt
from celery.contrib.abortable import AbortableAsyncResult
from celery.exceptions import TimeoutError
from celery.states import READY_STATES, RECEIVED, STARTED
Expand All @@ -21,7 +22,6 @@
)
from fastapi.responses import JSONResponse
from fastapi.security import HTTPBearer
from jose import JWTError, jwt
from sqlalchemy import select

from alts.scheduler import CONFIG
Expand Down Expand Up @@ -213,7 +213,7 @@ async def authenticate_user(credentials: str = Depends(http_bearer_scheme)):
CONFIG.jwt_secret,
algorithms=[CONFIG.hashing_algorithm],
)
except JWTError:
except jwt.PyJWTError:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Could not validate credentials",
Expand Down
21 changes: 10 additions & 11 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
PyYAML==6.0.1
asyncssh==2.14.2
PyYAML==6.0.2
asyncssh==2.17.0
azure-storage-blob==12.19.0
boto3==1.34.40
celery[redis]==5.3.6
celery[redis]==5.4.0
cryptography==43.0.1
filelock==3.13.1
filelock==3.16.1
filesplit==3.0.2,<4.0
librabbitmq==2.0.0
mako==1.3.2
plumbum==1.8.2
pulpcore-client==3.45.2
pydantic==2.6.1
pyone==6.8.1
requests==2.32.2
mako==1.3.5
plumbum==1.8.3
pulpcore-client==3.61.0
pydantic==2.9.2
pyone==6.10.0
requests==2.32.3
syncer==2.0.3
tap.py==3.1
10 changes: 5 additions & 5 deletions requirements/scheduler.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-r base.txt
SQLAlchemy==1.4.51
aiohttp==3.10.2
SQLAlchemy==1.4.54
aiohttp==3.10.5
databases[sqlite]==0.8.0
fastapi==0.109.2
python-jose==3.3.0
uvicorn==0.27.1
fastapi==0.115.0
pyjwt==2.9.0
uvicorn==0.30.6

0 comments on commit 7cb7683

Please sign in to comment.