mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-26 10:33:15 +03:00
Update RPC for FIDO functionality.
This commit is contained in:
parent
f070765b2e
commit
23faac99ed
@ -7,7 +7,7 @@ authors = ["Dain Nilsson <dain@yubico.com>"]
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.8"
|
||||
yubikey-manager = { git = "https://github.com/Yubico/yubikey-manager.git", rev = "22a72b2" }
|
||||
fido2 = { git = "https://github.com/Yubico/python-fido2.git", rev = "53175db" }
|
||||
fido2 = { git = "https://github.com/Yubico/python-fido2.git", rev = "14923ca" }
|
||||
mss = "^6.1.0"
|
||||
zxing-cpp = "^1.2.0"
|
||||
Pillow = "^8|^9"
|
||||
|
@ -85,6 +85,7 @@ def _handle_incoming(event, recv, error, cmd_queue):
|
||||
except RpcException as e:
|
||||
error(e.status, e.message, e.body)
|
||||
except Exception as e:
|
||||
logger.exception("Unhandled exception")
|
||||
error("exception", f"{e!r}")
|
||||
event.set()
|
||||
cmd_queue.put(None)
|
||||
@ -126,6 +127,7 @@ def process(
|
||||
except RpcException as e:
|
||||
error(e.status, e.message, e.body)
|
||||
except Exception as e:
|
||||
logger.exception("Unhandled exception")
|
||||
error("exception", f"{e!r}")
|
||||
cmd_queue.task_done()
|
||||
|
||||
|
@ -85,6 +85,7 @@ class Ctap2Node(RpcNode):
|
||||
)
|
||||
if self._info.options.get("bioEnroll"):
|
||||
uv_retries = self.client_pin.get_uv_retries()
|
||||
# For compatibility with python-fido2 < 1.0
|
||||
if isinstance(uv_retries, tuple):
|
||||
uv_retries = uv_retries[0]
|
||||
data.update(uv_retries=uv_retries)
|
||||
@ -302,7 +303,11 @@ class FingerprintsNode(RpcNode):
|
||||
self.refresh()
|
||||
|
||||
def refresh(self):
|
||||
self._templates = self.bio.enumerate_enrollments()
|
||||
self._templates = {
|
||||
# Treat empty strings as None
|
||||
k: v if v else None
|
||||
for k, v in self.bio.enumerate_enrollments().items()
|
||||
}
|
||||
|
||||
def list_children(self):
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user