Skip to content

Commit

Permalink
Merge pull request #181 from jlaine/no-cbor2-decoder
Browse files Browse the repository at this point in the history
Use `cbor2.loads` directly to avoid a deprecation warning
  • Loading branch information
MasterKale authored Oct 31, 2023
2 parents efc5345 + 207da73 commit aa21cb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webauthn/helpers/decode_credential_public_key.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Union

from cbor2 import decoder
import cbor2
from pydantic import BaseModel

from .cose import COSECRV, COSEKTY, COSEAlgorithmIdentifier, COSEKey
Expand Down Expand Up @@ -53,7 +53,7 @@ def decode_credential_public_key(
y=key[33:65],
)

decoded_key: dict = decoder.loads(key)
decoded_key: dict = cbor2.loads(key)

kty = decoded_key[COSEKey.KTY]
alg = decoded_key[COSEKey.ALG]
Expand Down

0 comments on commit aa21cb2

Please sign in to comment.