We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 98f1107 + c92aee5 commit 57a42f0Copy full SHA for 57a42f0
1 file changed
didcomm_messaging/crypto/backend/askar.py
@@ -87,6 +87,16 @@ def from_verification_method(cls, vm: VerificationMethod) -> "AskarKey":
87
key = cls.multikey_to_key(multikey)
88
return cls(key, kid)
89
90
+ if vm.type == "JsonWebKey2020":
91
+ jwk = vm.public_key_jwk
92
+ if not jwk:
93
+ raise ValueError("JWK verification method missing key")
94
+ try:
95
+ key = Key.from_jwk(jwk)
96
+ except AskarError as err:
97
+ raise ValueError("Invalid JWK") from err
98
+ return cls(key, kid)
99
+
100
alg = cls.type_to_alg.get(vm.type)
101
if not alg:
102
raise ValueError("Unsupported verification method type: {vm_type}")
0 commit comments