updates
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user