|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.WebAuth.Fido2Management</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.WebBrowser.WebAuth.Fido2Management</h1> |
|
10 <p> |
|
11 Module implementing a manager for FIDO2 security keys. |
|
12 </p> |
|
13 |
|
14 <h3>Global Attributes</h3> |
|
15 <table> |
|
16 <tr><td>None</td></tr> |
|
17 </table> |
|
18 |
|
19 <h3>Classes</h3> |
|
20 <table> |
|
21 <tr> |
|
22 <td><a href="#Fido2DeviceError">Fido2DeviceError</a></td> |
|
23 <td>Class signaling an issue with the device.</td> |
|
24 </tr> |
|
25 <tr> |
|
26 <td><a href="#Fido2Management">Fido2Management</a></td> |
|
27 <td>Class implementing a manager for FIDO2 security keys.</td> |
|
28 </tr> |
|
29 <tr> |
|
30 <td><a href="#Fido2PinError">Fido2PinError</a></td> |
|
31 <td>Class signaling an issue with the PIN.</td> |
|
32 </tr> |
|
33 </table> |
|
34 |
|
35 <h3>Functions</h3> |
|
36 <table> |
|
37 <tr><td>None</td></tr> |
|
38 </table> |
|
39 |
|
40 <hr /> |
|
41 <hr /> |
|
42 <a NAME="Fido2DeviceError" ID="Fido2DeviceError"></a> |
|
43 <h2>Fido2DeviceError</h2> |
|
44 <p> |
|
45 Class signaling an issue with the device. |
|
46 </p> |
|
47 |
|
48 <h3>Derived from</h3> |
|
49 Exception |
|
50 <h3>Class Attributes</h3> |
|
51 <table> |
|
52 <tr><td>None</td></tr> |
|
53 </table> |
|
54 |
|
55 <h3>Class Methods</h3> |
|
56 <table> |
|
57 <tr><td>None</td></tr> |
|
58 </table> |
|
59 |
|
60 <h3>Methods</h3> |
|
61 <table> |
|
62 <tr><td>None</td></tr> |
|
63 </table> |
|
64 |
|
65 <h3>Static Methods</h3> |
|
66 <table> |
|
67 <tr><td>None</td></tr> |
|
68 </table> |
|
69 |
|
70 |
|
71 <div align="right"><a href="#top">Up</a></div> |
|
72 <hr /> |
|
73 <hr /> |
|
74 <a NAME="Fido2Management" ID="Fido2Management"></a> |
|
75 <h2>Fido2Management</h2> |
|
76 <p> |
|
77 Class implementing a manager for FIDO2 security keys. |
|
78 </p> |
|
79 |
|
80 <h3>Signals</h3> |
|
81 <dl> |
|
82 |
|
83 <dt>deviceConnected()</dt> |
|
84 <dd> |
|
85 emitted to indicate a connect to the security key |
|
86 </dd> |
|
87 <dt>deviceDisconnected()</dt> |
|
88 <dd> |
|
89 emitted to indicate a disconnect from the security key |
|
90 </dd> |
|
91 </dl> |
|
92 <h3>Derived from</h3> |
|
93 QObject |
|
94 <h3>Class Attributes</h3> |
|
95 <table> |
|
96 <tr><td>FidoExtension2Str</td></tr> |
|
97 <tr><td>FidoInfoCategories2Str</td></tr> |
|
98 <tr><td>FidoVersion2Str</td></tr> |
|
99 </table> |
|
100 |
|
101 <h3>Class Methods</h3> |
|
102 <table> |
|
103 <tr><td>None</td></tr> |
|
104 </table> |
|
105 |
|
106 <h3>Methods</h3> |
|
107 <table> |
|
108 <tr> |
|
109 <td><a href="#Fido2Management.__init__">Fido2Management</a></td> |
|
110 <td>Constructor</td> |
|
111 </tr> |
|
112 <tr> |
|
113 <td><a href="#Fido2Management.__initConfig">__initConfig</a></td> |
|
114 <td>Private method to initialize a configuration object.</td> |
|
115 </tr> |
|
116 <tr> |
|
117 <td><a href="#Fido2Management.__initializeCredentialManager">__initializeCredentialManager</a></td> |
|
118 <td>Private method to initialize a credential manager object.</td> |
|
119 </tr> |
|
120 <tr> |
|
121 <td><a href="#Fido2Management.__pinErrorMessage">__pinErrorMessage</a></td> |
|
122 <td>Private method to get a message for a PIN error.</td> |
|
123 </tr> |
|
124 <tr> |
|
125 <td><a href="#Fido2Management.canSetMinimumPinLength">canSetMinimumPinLength</a></td> |
|
126 <td>Public method to check, if the 'setMinPINLength' function is available.</td> |
|
127 </tr> |
|
128 <tr> |
|
129 <td><a href="#Fido2Management.canToggleAlwaysUv">canToggleAlwaysUv</a></td> |
|
130 <td>Public method to check, if the 'toggleAlwaysUv' function is available.</td> |
|
131 </tr> |
|
132 <tr> |
|
133 <td><a href="#Fido2Management.changePasskeyUserInfo">changePasskeyUserInfo</a></td> |
|
134 <td>Public method to change the user info of a stored passkey.</td> |
|
135 </tr> |
|
136 <tr> |
|
137 <td><a href="#Fido2Management.changePin">changePin</a></td> |
|
138 <td>Public method to change the PIN of the connected security key.</td> |
|
139 </tr> |
|
140 <tr> |
|
141 <td><a href="#Fido2Management.connectToDevice">connectToDevice</a></td> |
|
142 <td>Public method to connect to a given security key.</td> |
|
143 </tr> |
|
144 <tr> |
|
145 <td><a href="#Fido2Management.deletePasskey">deletePasskey</a></td> |
|
146 <td>Public method to delete the passkey of the given ID.</td> |
|
147 </tr> |
|
148 <tr> |
|
149 <td><a href="#Fido2Management.disconnectFromDevice">disconnectFromDevice</a></td> |
|
150 <td>Public method to disconnect from the current device.</td> |
|
151 </tr> |
|
152 <tr> |
|
153 <td><a href="#Fido2Management.forcePinChange">forcePinChange</a></td> |
|
154 <td>Public method to force the PIN to be changed to a new value before use.</td> |
|
155 </tr> |
|
156 <tr> |
|
157 <td><a href="#Fido2Management.forcePinChangeSupported">forcePinChangeSupported</a></td> |
|
158 <td>Public method to check, if the 'forcePinChange' function is supported by the selected security key.</td> |
|
159 </tr> |
|
160 <tr> |
|
161 <td><a href="#Fido2Management.getAlwaysUv">getAlwaysUv</a></td> |
|
162 <td>Public method to get the value of the 'alwaysUv' flag of the current security key.</td> |
|
163 </tr> |
|
164 <tr> |
|
165 <td><a href="#Fido2Management.getDevices">getDevices</a></td> |
|
166 <td>Public method to get a list of connected security keys.</td> |
|
167 </tr> |
|
168 <tr> |
|
169 <td><a href="#Fido2Management.getMinimumPinLength">getMinimumPinLength</a></td> |
|
170 <td>Public method to get the minimum PIN length defined by the security key.</td> |
|
171 </tr> |
|
172 <tr> |
|
173 <td><a href="#Fido2Management.getPasskeys">getPasskeys</a></td> |
|
174 <td>Public method to get all stored passkeys.</td> |
|
175 </tr> |
|
176 <tr> |
|
177 <td><a href="#Fido2Management.getPinRetries">getPinRetries</a></td> |
|
178 <td>Public method to get the number of PIN retries left and an indication for the need of a power cycle.</td> |
|
179 </tr> |
|
180 <tr> |
|
181 <td><a href="#Fido2Management.getSecurityKeyInfo">getSecurityKeyInfo</a></td> |
|
182 <td>Public method to get information about the connected security key.</td> |
|
183 </tr> |
|
184 <tr> |
|
185 <td><a href="#Fido2Management.hasPin">hasPin</a></td> |
|
186 <td>Public method to check, if the connected security key has a PIN set.</td> |
|
187 </tr> |
|
188 <tr> |
|
189 <td><a href="#Fido2Management.isDeviceLocked">isDeviceLocked</a></td> |
|
190 <td>Public method to check, if the device is in locked state (i.e.</td> |
|
191 </tr> |
|
192 <tr> |
|
193 <td><a href="#Fido2Management.lockDevice">lockDevice</a></td> |
|
194 <td>Public method to lock the device (i.e.</td> |
|
195 </tr> |
|
196 <tr> |
|
197 <td><a href="#Fido2Management.pinChangeRequired">pinChangeRequired</a></td> |
|
198 <td>Public method to check for a forced PIN change.</td> |
|
199 </tr> |
|
200 <tr> |
|
201 <td><a href="#Fido2Management.reconnectToDevice">reconnectToDevice</a></td> |
|
202 <td>Public method to reconnect the current security key.</td> |
|
203 </tr> |
|
204 <tr> |
|
205 <td><a href="#Fido2Management.resetDevice">resetDevice</a></td> |
|
206 <td>Public method to reset the connected security key.</td> |
|
207 </tr> |
|
208 <tr> |
|
209 <td><a href="#Fido2Management.setMinimumPinLength">setMinimumPinLength</a></td> |
|
210 <td>Public method to set the minimum PIN length.</td> |
|
211 </tr> |
|
212 <tr> |
|
213 <td><a href="#Fido2Management.setPin">setPin</a></td> |
|
214 <td>Public method to set a PIN for the connected security key.</td> |
|
215 </tr> |
|
216 <tr> |
|
217 <td><a href="#Fido2Management.toggleAlwaysUv">toggleAlwaysUv</a></td> |
|
218 <td>Public method to toggle the 'alwaysUv' flag of the selected security key.</td> |
|
219 </tr> |
|
220 <tr> |
|
221 <td><a href="#Fido2Management.unlockDevice">unlockDevice</a></td> |
|
222 <td>Public method to unlock the device (i.e.</td> |
|
223 </tr> |
|
224 <tr> |
|
225 <td><a href="#Fido2Management.verifyPin">verifyPin</a></td> |
|
226 <td>Public method to verify a given PIN.</td> |
|
227 </tr> |
|
228 </table> |
|
229 |
|
230 <h3>Static Methods</h3> |
|
231 <table> |
|
232 <tr><td>None</td></tr> |
|
233 </table> |
|
234 |
|
235 |
|
236 <a NAME="Fido2Management.__init__" ID="Fido2Management.__init__"></a> |
|
237 <h4>Fido2Management (Constructor)</h4> |
|
238 <b>Fido2Management</b>(<i>parent=None</i>) |
|
239 <p> |
|
240 Constructor |
|
241 </p> |
|
242 |
|
243 <dl> |
|
244 |
|
245 <dt><i>parent</i> (QObject (optional))</dt> |
|
246 <dd> |
|
247 reference to the parent object (defaults to None) |
|
248 </dd> |
|
249 </dl> |
|
250 <a NAME="Fido2Management.__initConfig" ID="Fido2Management.__initConfig"></a> |
|
251 <h4>Fido2Management.__initConfig</h4> |
|
252 <b>__initConfig</b>(<i>pin</i>) |
|
253 <p> |
|
254 Private method to initialize a configuration object. |
|
255 </p> |
|
256 |
|
257 <dl> |
|
258 |
|
259 <dt><i>pin</i> (str)</dt> |
|
260 <dd> |
|
261 PIN to unlock the connected security key |
|
262 </dd> |
|
263 </dl> |
|
264 <dl> |
|
265 <dt>Return:</dt> |
|
266 <dd> |
|
267 reference to the configuration object |
|
268 </dd> |
|
269 </dl> |
|
270 <dl> |
|
271 <dt>Return Type:</dt> |
|
272 <dd> |
|
273 Config |
|
274 </dd> |
|
275 </dl> |
|
276 <dl> |
|
277 |
|
278 <dt>Raises <b>Fido2DeviceError</b>:</dt> |
|
279 <dd> |
|
280 raised to indicate an issue with the selected |
|
281 security key |
|
282 </dd> |
|
283 <dt>Raises <b>Fido2PinError</b>:</dt> |
|
284 <dd> |
|
285 raised to indicate an issue with the PIN |
|
286 </dd> |
|
287 </dl> |
|
288 <a NAME="Fido2Management.__initializeCredentialManager" ID="Fido2Management.__initializeCredentialManager"></a> |
|
289 <h4>Fido2Management.__initializeCredentialManager</h4> |
|
290 <b>__initializeCredentialManager</b>(<i>pin</i>) |
|
291 <p> |
|
292 Private method to initialize a credential manager object. |
|
293 </p> |
|
294 |
|
295 <dl> |
|
296 |
|
297 <dt><i>pin</i> (str)</dt> |
|
298 <dd> |
|
299 PIN to unlock the connected security key |
|
300 </dd> |
|
301 </dl> |
|
302 <dl> |
|
303 <dt>Return:</dt> |
|
304 <dd> |
|
305 reference to the credential manager object |
|
306 </dd> |
|
307 </dl> |
|
308 <dl> |
|
309 <dt>Return Type:</dt> |
|
310 <dd> |
|
311 CredentialManagement |
|
312 </dd> |
|
313 </dl> |
|
314 <dl> |
|
315 |
|
316 <dt>Raises <b>Fido2DeviceError</b>:</dt> |
|
317 <dd> |
|
318 raised to indicate an issue with the selected |
|
319 security key |
|
320 </dd> |
|
321 <dt>Raises <b>Fido2PinError</b>:</dt> |
|
322 <dd> |
|
323 raised to indicate an issue with the PIN |
|
324 </dd> |
|
325 </dl> |
|
326 <a NAME="Fido2Management.__pinErrorMessage" ID="Fido2Management.__pinErrorMessage"></a> |
|
327 <h4>Fido2Management.__pinErrorMessage</h4> |
|
328 <b>__pinErrorMessage</b>(<i>err</i>) |
|
329 <p> |
|
330 Private method to get a message for a PIN error. |
|
331 </p> |
|
332 |
|
333 <dl> |
|
334 |
|
335 <dt><i>err</i> (CtapError)</dt> |
|
336 <dd> |
|
337 reference to the exception object |
|
338 </dd> |
|
339 </dl> |
|
340 <dl> |
|
341 <dt>Return:</dt> |
|
342 <dd> |
|
343 message for the given PIN error |
|
344 </dd> |
|
345 </dl> |
|
346 <dl> |
|
347 <dt>Return Type:</dt> |
|
348 <dd> |
|
349 str |
|
350 </dd> |
|
351 </dl> |
|
352 <a NAME="Fido2Management.canSetMinimumPinLength" ID="Fido2Management.canSetMinimumPinLength"></a> |
|
353 <h4>Fido2Management.canSetMinimumPinLength</h4> |
|
354 <b>canSetMinimumPinLength</b>(<i></i>) |
|
355 <p> |
|
356 Public method to check, if the 'setMinPINLength' function is available. |
|
357 </p> |
|
358 |
|
359 <dl> |
|
360 <dt>Return:</dt> |
|
361 <dd> |
|
362 flag indicating availability |
|
363 </dd> |
|
364 </dl> |
|
365 <dl> |
|
366 <dt>Return Type:</dt> |
|
367 <dd> |
|
368 bool |
|
369 </dd> |
|
370 </dl> |
|
371 <a NAME="Fido2Management.canToggleAlwaysUv" ID="Fido2Management.canToggleAlwaysUv"></a> |
|
372 <h4>Fido2Management.canToggleAlwaysUv</h4> |
|
373 <b>canToggleAlwaysUv</b>(<i></i>) |
|
374 <p> |
|
375 Public method to check, if the 'toggleAlwaysUv' function is available. |
|
376 </p> |
|
377 |
|
378 <dl> |
|
379 <dt>Return:</dt> |
|
380 <dd> |
|
381 flag indicating availability |
|
382 </dd> |
|
383 </dl> |
|
384 <dl> |
|
385 <dt>Return Type:</dt> |
|
386 <dd> |
|
387 bool |
|
388 </dd> |
|
389 </dl> |
|
390 <a NAME="Fido2Management.changePasskeyUserInfo" ID="Fido2Management.changePasskeyUserInfo"></a> |
|
391 <h4>Fido2Management.changePasskeyUserInfo</h4> |
|
392 <b>changePasskeyUserInfo</b>(<i>pin, credentialId, userId, userName, displayName</i>) |
|
393 <p> |
|
394 Public method to change the user info of a stored passkey. |
|
395 </p> |
|
396 |
|
397 <dl> |
|
398 |
|
399 <dt><i>pin</i> (str)</dt> |
|
400 <dd> |
|
401 PIN to unlock the connected security key |
|
402 </dd> |
|
403 <dt><i>credentialId</i> (fido2.webauthn.PublicKeyCredentialDescriptor)</dt> |
|
404 <dd> |
|
405 ID of the passkey to change |
|
406 </dd> |
|
407 <dt><i>userId</i> (bytes)</dt> |
|
408 <dd> |
|
409 ID of the user |
|
410 </dd> |
|
411 <dt><i>userName</i> (str)</dt> |
|
412 <dd> |
|
413 user name to set |
|
414 </dd> |
|
415 <dt><i>displayName</i> (str)</dt> |
|
416 <dd> |
|
417 display name to set |
|
418 </dd> |
|
419 </dl> |
|
420 <a NAME="Fido2Management.changePin" ID="Fido2Management.changePin"></a> |
|
421 <h4>Fido2Management.changePin</h4> |
|
422 <b>changePin</b>(<i>oldPin, newPin</i>) |
|
423 <p> |
|
424 Public method to change the PIN of the connected security key. |
|
425 </p> |
|
426 |
|
427 <dl> |
|
428 |
|
429 <dt><i>oldPin</i> (str)</dt> |
|
430 <dd> |
|
431 current PIN |
|
432 </dd> |
|
433 <dt><i>newPin</i> (str)</dt> |
|
434 <dd> |
|
435 new PIN |
|
436 </dd> |
|
437 </dl> |
|
438 <dl> |
|
439 <dt>Return:</dt> |
|
440 <dd> |
|
441 flag indicating success and a message |
|
442 </dd> |
|
443 </dl> |
|
444 <dl> |
|
445 <dt>Return Type:</dt> |
|
446 <dd> |
|
447 tuple of (bool, str) |
|
448 </dd> |
|
449 </dl> |
|
450 <a NAME="Fido2Management.connectToDevice" ID="Fido2Management.connectToDevice"></a> |
|
451 <h4>Fido2Management.connectToDevice</h4> |
|
452 <b>connectToDevice</b>(<i>device</i>) |
|
453 <p> |
|
454 Public method to connect to a given security key. |
|
455 </p> |
|
456 |
|
457 <dl> |
|
458 |
|
459 <dt><i>device</i> (CtapHidDevice)</dt> |
|
460 <dd> |
|
461 reference to the security key device class |
|
462 </dd> |
|
463 </dl> |
|
464 <a NAME="Fido2Management.deletePasskey" ID="Fido2Management.deletePasskey"></a> |
|
465 <h4>Fido2Management.deletePasskey</h4> |
|
466 <b>deletePasskey</b>(<i>pin, credentialId</i>) |
|
467 <p> |
|
468 Public method to delete the passkey of the given ID. |
|
469 </p> |
|
470 |
|
471 <dl> |
|
472 |
|
473 <dt><i>pin</i> (str)</dt> |
|
474 <dd> |
|
475 PIN to unlock the connected security key |
|
476 </dd> |
|
477 <dt><i>credentialId</i> (fido2.webauthn.PublicKeyCredentialDescriptor)</dt> |
|
478 <dd> |
|
479 ID of the passkey to be deleted |
|
480 </dd> |
|
481 </dl> |
|
482 <a NAME="Fido2Management.disconnectFromDevice" ID="Fido2Management.disconnectFromDevice"></a> |
|
483 <h4>Fido2Management.disconnectFromDevice</h4> |
|
484 <b>disconnectFromDevice</b>(<i></i>) |
|
485 <p> |
|
486 Public method to disconnect from the current device. |
|
487 </p> |
|
488 |
|
489 <a NAME="Fido2Management.forcePinChange" ID="Fido2Management.forcePinChange"></a> |
|
490 <h4>Fido2Management.forcePinChange</h4> |
|
491 <b>forcePinChange</b>(<i>pin</i>) |
|
492 <p> |
|
493 Public method to force the PIN to be changed to a new value before use. |
|
494 </p> |
|
495 |
|
496 <dl> |
|
497 |
|
498 <dt><i>pin</i> (str)</dt> |
|
499 <dd> |
|
500 PIN to unlock the connected security key |
|
501 </dd> |
|
502 </dl> |
|
503 <a NAME="Fido2Management.forcePinChangeSupported" ID="Fido2Management.forcePinChangeSupported"></a> |
|
504 <h4>Fido2Management.forcePinChangeSupported</h4> |
|
505 <b>forcePinChangeSupported</b>(<i></i>) |
|
506 <p> |
|
507 Public method to check, if the 'forcePinChange' function is supported by the |
|
508 selected security key. |
|
509 </p> |
|
510 |
|
511 <dl> |
|
512 <dt>Return:</dt> |
|
513 <dd> |
|
514 flag indicating support |
|
515 </dd> |
|
516 </dl> |
|
517 <dl> |
|
518 <dt>Return Type:</dt> |
|
519 <dd> |
|
520 bool |
|
521 </dd> |
|
522 </dl> |
|
523 <a NAME="Fido2Management.getAlwaysUv" ID="Fido2Management.getAlwaysUv"></a> |
|
524 <h4>Fido2Management.getAlwaysUv</h4> |
|
525 <b>getAlwaysUv</b>(<i></i>) |
|
526 <p> |
|
527 Public method to get the value of the 'alwaysUv' flag of the current security |
|
528 key. |
|
529 </p> |
|
530 |
|
531 <dl> |
|
532 <dt>Return:</dt> |
|
533 <dd> |
|
534 return value of the 'alwaysUv' flag |
|
535 </dd> |
|
536 </dl> |
|
537 <dl> |
|
538 <dt>Return Type:</dt> |
|
539 <dd> |
|
540 bool |
|
541 </dd> |
|
542 </dl> |
|
543 <a NAME="Fido2Management.getDevices" ID="Fido2Management.getDevices"></a> |
|
544 <h4>Fido2Management.getDevices</h4> |
|
545 <b>getDevices</b>(<i></i>) |
|
546 <p> |
|
547 Public method to get a list of connected security keys. |
|
548 </p> |
|
549 |
|
550 <dl> |
|
551 <dt>Return:</dt> |
|
552 <dd> |
|
553 list of connected security keys |
|
554 </dd> |
|
555 </dl> |
|
556 <dl> |
|
557 <dt>Return Type:</dt> |
|
558 <dd> |
|
559 list of CtapHidDevice |
|
560 </dd> |
|
561 </dl> |
|
562 <a NAME="Fido2Management.getMinimumPinLength" ID="Fido2Management.getMinimumPinLength"></a> |
|
563 <h4>Fido2Management.getMinimumPinLength</h4> |
|
564 <b>getMinimumPinLength</b>(<i></i>) |
|
565 <p> |
|
566 Public method to get the minimum PIN length defined by the security key. |
|
567 </p> |
|
568 |
|
569 <dl> |
|
570 <dt>Return:</dt> |
|
571 <dd> |
|
572 minimum length for the PIN |
|
573 </dd> |
|
574 </dl> |
|
575 <dl> |
|
576 <dt>Return Type:</dt> |
|
577 <dd> |
|
578 int |
|
579 </dd> |
|
580 </dl> |
|
581 <a NAME="Fido2Management.getPasskeys" ID="Fido2Management.getPasskeys"></a> |
|
582 <h4>Fido2Management.getPasskeys</h4> |
|
583 <b>getPasskeys</b>(<i>pin</i>) |
|
584 <p> |
|
585 Public method to get all stored passkeys. |
|
586 </p> |
|
587 |
|
588 <dl> |
|
589 |
|
590 <dt><i>pin</i> (str)</dt> |
|
591 <dd> |
|
592 PIN to unlock the connected security key |
|
593 </dd> |
|
594 </dl> |
|
595 <dl> |
|
596 <dt>Return:</dt> |
|
597 <dd> |
|
598 tuple containing a dictionary containing the stored passkeys grouped |
|
599 by Relying Party ID, the count of used credential slots and the count |
|
600 of available credential slots |
|
601 </dd> |
|
602 </dl> |
|
603 <dl> |
|
604 <dt>Return Type:</dt> |
|
605 <dd> |
|
606 tuple of [dict[str, list[dict[str, Any]]], int, int] |
|
607 </dd> |
|
608 </dl> |
|
609 <a NAME="Fido2Management.getPinRetries" ID="Fido2Management.getPinRetries"></a> |
|
610 <h4>Fido2Management.getPinRetries</h4> |
|
611 <b>getPinRetries</b>(<i></i>) |
|
612 <p> |
|
613 Public method to get the number of PIN retries left and an indication for the |
|
614 need of a power cycle. |
|
615 </p> |
|
616 |
|
617 <dl> |
|
618 <dt>Return:</dt> |
|
619 <dd> |
|
620 tuple containing the number of retries left and a flag indicating a |
|
621 power cycle is required. A retry value of -1 indicates, that no PIN was |
|
622 set yet. |
|
623 </dd> |
|
624 </dl> |
|
625 <dl> |
|
626 <dt>Return Type:</dt> |
|
627 <dd> |
|
628 tuple of (int, bool) |
|
629 </dd> |
|
630 </dl> |
|
631 <a NAME="Fido2Management.getSecurityKeyInfo" ID="Fido2Management.getSecurityKeyInfo"></a> |
|
632 <h4>Fido2Management.getSecurityKeyInfo</h4> |
|
633 <b>getSecurityKeyInfo</b>(<i></i>) |
|
634 <p> |
|
635 Public method to get information about the connected security key. |
|
636 </p> |
|
637 |
|
638 <dl> |
|
639 <dt>Return:</dt> |
|
640 <dd> |
|
641 dictionary containing the info data |
|
642 </dd> |
|
643 </dl> |
|
644 <dl> |
|
645 <dt>Return Type:</dt> |
|
646 <dd> |
|
647 dict[str, list[tuple[str, str]]] |
|
648 </dd> |
|
649 </dl> |
|
650 <a NAME="Fido2Management.hasPin" ID="Fido2Management.hasPin"></a> |
|
651 <h4>Fido2Management.hasPin</h4> |
|
652 <b>hasPin</b>(<i></i>) |
|
653 <p> |
|
654 Public method to check, if the connected security key has a PIN set. |
|
655 </p> |
|
656 |
|
657 <dl> |
|
658 <dt>Return:</dt> |
|
659 <dd> |
|
660 flag indicating that a PIN has been set or None in case no device |
|
661 was connected yet or it does not support PIN |
|
662 </dd> |
|
663 </dl> |
|
664 <dl> |
|
665 <dt>Return Type:</dt> |
|
666 <dd> |
|
667 bool or None |
|
668 </dd> |
|
669 </dl> |
|
670 <a NAME="Fido2Management.isDeviceLocked" ID="Fido2Management.isDeviceLocked"></a> |
|
671 <h4>Fido2Management.isDeviceLocked</h4> |
|
672 <b>isDeviceLocked</b>(<i></i>) |
|
673 <p> |
|
674 Public method to check, if the device is in locked state (i.e. the stored PIN |
|
675 is None). |
|
676 </p> |
|
677 |
|
678 <dl> |
|
679 <dt>Return:</dt> |
|
680 <dd> |
|
681 flag indicating the locked state |
|
682 </dd> |
|
683 </dl> |
|
684 <dl> |
|
685 <dt>Return Type:</dt> |
|
686 <dd> |
|
687 bool |
|
688 </dd> |
|
689 </dl> |
|
690 <a NAME="Fido2Management.lockDevice" ID="Fido2Management.lockDevice"></a> |
|
691 <h4>Fido2Management.lockDevice</h4> |
|
692 <b>lockDevice</b>(<i></i>) |
|
693 <p> |
|
694 Public method to lock the device (i.e. delete the stored PIN). |
|
695 </p> |
|
696 |
|
697 <a NAME="Fido2Management.pinChangeRequired" ID="Fido2Management.pinChangeRequired"></a> |
|
698 <h4>Fido2Management.pinChangeRequired</h4> |
|
699 <b>pinChangeRequired</b>(<i></i>) |
|
700 <p> |
|
701 Public method to check for a forced PIN change. |
|
702 </p> |
|
703 |
|
704 <dl> |
|
705 <dt>Return:</dt> |
|
706 <dd> |
|
707 flag indicating a forced PIN change is required |
|
708 </dd> |
|
709 </dl> |
|
710 <dl> |
|
711 <dt>Return Type:</dt> |
|
712 <dd> |
|
713 bool |
|
714 </dd> |
|
715 </dl> |
|
716 <a NAME="Fido2Management.reconnectToDevice" ID="Fido2Management.reconnectToDevice"></a> |
|
717 <h4>Fido2Management.reconnectToDevice</h4> |
|
718 <b>reconnectToDevice</b>(<i></i>) |
|
719 <p> |
|
720 Public method to reconnect the current security key. |
|
721 </p> |
|
722 |
|
723 <a NAME="Fido2Management.resetDevice" ID="Fido2Management.resetDevice"></a> |
|
724 <h4>Fido2Management.resetDevice</h4> |
|
725 <b>resetDevice</b>(<i></i>) |
|
726 <p> |
|
727 Public method to reset the connected security key. |
|
728 </p> |
|
729 |
|
730 <dl> |
|
731 <dt>Return:</dt> |
|
732 <dd> |
|
733 flag indicating success and a message |
|
734 </dd> |
|
735 </dl> |
|
736 <dl> |
|
737 <dt>Return Type:</dt> |
|
738 <dd> |
|
739 tuple of (bool, str) |
|
740 </dd> |
|
741 </dl> |
|
742 <a NAME="Fido2Management.setMinimumPinLength" ID="Fido2Management.setMinimumPinLength"></a> |
|
743 <h4>Fido2Management.setMinimumPinLength</h4> |
|
744 <b>setMinimumPinLength</b>(<i>pin, minLength</i>) |
|
745 <p> |
|
746 Public method to set the minimum PIN length. |
|
747 </p> |
|
748 |
|
749 <dl> |
|
750 |
|
751 <dt><i>pin</i> (str)</dt> |
|
752 <dd> |
|
753 PIN to unlock the connected security key |
|
754 </dd> |
|
755 <dt><i>minLength</i> (int)</dt> |
|
756 <dd> |
|
757 minimum PIN length |
|
758 </dd> |
|
759 </dl> |
|
760 <dl> |
|
761 |
|
762 <dt>Raises <b>Fido2PinError</b>:</dt> |
|
763 <dd> |
|
764 raised to indicate an issue with the PIN length |
|
765 </dd> |
|
766 </dl> |
|
767 <a NAME="Fido2Management.setPin" ID="Fido2Management.setPin"></a> |
|
768 <h4>Fido2Management.setPin</h4> |
|
769 <b>setPin</b>(<i>pin</i>) |
|
770 <p> |
|
771 Public method to set a PIN for the connected security key. |
|
772 </p> |
|
773 |
|
774 <dl> |
|
775 |
|
776 <dt><i>pin</i> (str)</dt> |
|
777 <dd> |
|
778 PIN to be set |
|
779 </dd> |
|
780 </dl> |
|
781 <dl> |
|
782 <dt>Return:</dt> |
|
783 <dd> |
|
784 flag indicating success and a message |
|
785 </dd> |
|
786 </dl> |
|
787 <dl> |
|
788 <dt>Return Type:</dt> |
|
789 <dd> |
|
790 tuple of (bool, str) |
|
791 </dd> |
|
792 </dl> |
|
793 <a NAME="Fido2Management.toggleAlwaysUv" ID="Fido2Management.toggleAlwaysUv"></a> |
|
794 <h4>Fido2Management.toggleAlwaysUv</h4> |
|
795 <b>toggleAlwaysUv</b>(<i>pin</i>) |
|
796 <p> |
|
797 Public method to toggle the 'alwaysUv' flag of the selected security key. |
|
798 </p> |
|
799 |
|
800 <dl> |
|
801 |
|
802 <dt><i>pin</i> (str)</dt> |
|
803 <dd> |
|
804 PIN to unlock the connected security key |
|
805 </dd> |
|
806 </dl> |
|
807 <a NAME="Fido2Management.unlockDevice" ID="Fido2Management.unlockDevice"></a> |
|
808 <h4>Fido2Management.unlockDevice</h4> |
|
809 <b>unlockDevice</b>(<i>pin</i>) |
|
810 <p> |
|
811 Public method to unlock the device (i.e. store the PIN for later use). |
|
812 </p> |
|
813 |
|
814 <dl> |
|
815 |
|
816 <dt><i>pin</i> (str)</dt> |
|
817 <dd> |
|
818 PIN to be stored |
|
819 </dd> |
|
820 </dl> |
|
821 <a NAME="Fido2Management.verifyPin" ID="Fido2Management.verifyPin"></a> |
|
822 <h4>Fido2Management.verifyPin</h4> |
|
823 <b>verifyPin</b>(<i>pin</i>) |
|
824 <p> |
|
825 Public method to verify a given PIN. |
|
826 </p> |
|
827 <p> |
|
828 A successful verification of the PIN will reset the "retries" counter. |
|
829 </p> |
|
830 |
|
831 <dl> |
|
832 |
|
833 <dt><i>pin</i> (str)</dt> |
|
834 <dd> |
|
835 PIN to be verified |
|
836 </dd> |
|
837 </dl> |
|
838 <dl> |
|
839 <dt>Return:</dt> |
|
840 <dd> |
|
841 flag indicating successful verification and a verification message |
|
842 </dd> |
|
843 </dl> |
|
844 <dl> |
|
845 <dt>Return Type:</dt> |
|
846 <dd> |
|
847 tuple of (bool, str) |
|
848 </dd> |
|
849 </dl> |
|
850 <div align="right"><a href="#top">Up</a></div> |
|
851 <hr /> |
|
852 <hr /> |
|
853 <a NAME="Fido2PinError" ID="Fido2PinError"></a> |
|
854 <h2>Fido2PinError</h2> |
|
855 <p> |
|
856 Class signaling an issue with the PIN. |
|
857 </p> |
|
858 |
|
859 <h3>Derived from</h3> |
|
860 Exception |
|
861 <h3>Class Attributes</h3> |
|
862 <table> |
|
863 <tr><td>None</td></tr> |
|
864 </table> |
|
865 |
|
866 <h3>Class Methods</h3> |
|
867 <table> |
|
868 <tr><td>None</td></tr> |
|
869 </table> |
|
870 |
|
871 <h3>Methods</h3> |
|
872 <table> |
|
873 <tr><td>None</td></tr> |
|
874 </table> |
|
875 |
|
876 <h3>Static Methods</h3> |
|
877 <table> |
|
878 <tr><td>None</td></tr> |
|
879 </table> |
|
880 |
|
881 |
|
882 <div align="right"><a href="#top">Up</a></div> |
|
883 <hr /> |
|
884 </body></html> |