messign with leds

This commit is contained in:
Eggman20339 2024-05-05 19:34:39 -04:00
parent 41a2ec0e4d
commit 23b09a791a
3 changed files with 11 additions and 3 deletions

View File

@ -5,7 +5,7 @@
<excludeFolder url="file://$MODULE_DIR$/.venv" />
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.11 (CNSA-276-FP) (2)" jdkType="Python SDK" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -3,5 +3,5 @@
<component name="Black">
<option name="sdkName" value="Python 3.12 (CNSA-276-FP)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (CNSA-276-FP) (2)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (CNSA-276-FP)" project-jdk-type="Python SDK" />
</project>

10
main.py
View File

@ -32,7 +32,7 @@ This works with both FIDO 2.0 devices as well as with U2F devices.
On Windows, the native WebAuthn API will be used.
"""
import time
import RPI.GPIO as GPIO
import pickle
import psycopg2
import fido2.webauthn
@ -45,6 +45,8 @@ import ctypes
from fido2.ctap2 import Ctap2
gotAaguid = None
GPIO.setmode(GPIO.BCM)
GPIO.setup(14, GPIO.OUT)
class CliInteraction(UserInteraction):
def prompt_up(self):
@ -181,6 +183,12 @@ while True:
print("Credential authenticated!")
for i in range(10):
GPIO.output(14, GPIO.HIGH)
time.sleep(0.2)
GPIO.output(14, GPIO.LOW)
time.sleep(0.2)
print("CLIENT DATA:", result.client_data)
print()
print("AUTH DATA:", result.authenticator_data)