Ejemplo n.º 1
0
 def get_u2f_devices(self):
     rv = []
     for data in self.config.get('devices') or ():
         rv.append(u2f_jsapi.DeviceRegistration(data['binding']))
     return rv
Ejemplo n.º 2
0
 def get_u2f_device(self):
     device = self.config.get('device')
     if device is None:
         raise RuntimeError('This authenticator is not enrolled.')
     return u2f_jsapi.DeviceRegistration(device)