Skip to content

Commit

Permalink
CTAP: Handle expired PIN token
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Sep 11, 2024
1 parent 9834672 commit bb00b2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions helper/helper/fido.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ def __init__(self, connection):
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}")
Expand Down

0 comments on commit bb00b2c

Please sign in to comment.