CTAP: Handle expired PIN token

This commit is contained in:
Dain Nilsson 2024-09-11 15:24:44 +02:00
parent 9834672f67
commit bb00b2c65e
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8

View File

@ -91,6 +91,14 @@ class Ctap2Node(RpcNode):
self.client_pin = ClientPin(self.ctap)
self._token = None
def __call__(self, *args, **kwargs):
try:
return super().__call__(*args, **kwargs)
except CtapError as e:
if e.code == CtapError.ERR.PIN_AUTH_INVALID:
raise AuthRequiredException()
raise
def get_data(self):
self._info = self.ctap.get_info()
logger.debug(f"Info: {self._info}")