This commit is contained in:
Iliyan Angelov
2025-12-01 06:50:10 +02:00
parent 91f51bc6fe
commit 62c1fe5951
4682 changed files with 544807 additions and 31208 deletions

View File

@@ -1,6 +1,10 @@
import binascii
import json
from collections.abc import Iterable, Mapping
try:
from collections.abc import Iterable, Mapping
except ImportError:
from collections import Mapping, Iterable
from jose import jwk
from jose.backends.base import Key
@@ -215,7 +219,6 @@ def _sig_matches_keys(keys, signing_input, signature, alg):
def _get_keys(key):
if isinstance(key, Key):
return (key,)
@@ -248,7 +251,6 @@ def _get_keys(key):
def _verify_signature(signing_input, header, signature, key="", algorithms=None):
alg = header.get("alg")
if not alg:
raise JWSError("No algorithm was specified in the JWS header.")