From 4e2602a3e3909e0cb55444f4b4787347bacaf098 Mon Sep 17 00:00:00 2001 From: matkaczmarek Date: Fri, 4 Oct 2024 11:37:53 +0200 Subject: [PATCH] Rebase and resolve conflicts in poetry.lock --- physionet-django/user/validators.py | 4 +++- poetry.lock | 2 +- requirements.txt | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/physionet-django/user/validators.py b/physionet-django/user/validators.py index 2c306243b..edc19c2a4 100644 --- a/physionet-django/user/validators.py +++ b/physionet-django/user/validators.py @@ -211,6 +211,7 @@ def validate_nan(value): if re.fullmatch(r'[0-9\-+()]*', value): raise ValidationError('Cannot be a number.') + def validate_orcid_token(value): """ Validation to verify the token returned during @@ -219,6 +220,7 @@ def validate_orcid_token(value): if not re.fullmatch(r'^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$', value): raise ValidationError('ORCID token is not in expected format.') + def validate_orcid_id_token(token): """ When openid scope is enabled then ORCID returns @@ -246,7 +248,7 @@ def validate_orcid_id_token(token): audience=settings.ORCID_CLIENT_ID, issuer=settings.ORCID_DOMAIN ) - except jwt.InvalidTokenError as e: + except jwt.InvalidTokenError: raise ValidationError('ORCID id_token is invalid.') def validate_orcid_id(value): diff --git a/poetry.lock b/poetry.lock index 8958817f8..209bf9898 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1817,4 +1817,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "19fb58009a4ecb2e178d0dc1459694f10a16f09758853eac0dcd765a1b271967" +content-hash = "23b54601a6a94c6824e7b7ada009153cc9d191a03dc3025ce1e4108caec12210" diff --git a/requirements.txt b/requirements.txt index 302aaf5f2..102784965 100644 --- a/requirements.txt +++ b/requirements.txt @@ -539,6 +539,9 @@ pyasn1==0.4.8 ; python_version >= "3.9" and python_version < "4.0" \ pycparser==2.20 ; python_version >= "3.9" and python_version < "4.0" \ --hash=sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0 \ --hash=sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705 +pyjwt==2.9.0 ; python_version >= "3.9" and python_version < "4.0" \ + --hash=sha256:3b02fb0f44517787776cf48f2ae25d8e14f300e6d7545a4315cee571a415e850 \ + --hash=sha256:7e1e5b56cc735432a7369cbfa0efe50fa113ebecdc04ae6922deba8b84582d0c pyopenssl==23.2.0 ; python_version >= "3.9" and python_version < "4.0" \ --hash=sha256:24f0dc5227396b3e831f4c7f602b950a5e9833d292c8e4a2e06b709292806ae2 \ --hash=sha256:276f931f55a452e7dea69c7173e984eb2a4407ce413c918aa34b55f82f9b8bac