messign with leds
This commit is contained in:
parent
41a2ec0e4d
commit
23b09a791a
@ -5,7 +5,7 @@
|
|||||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3.11 (CNSA-276-FP) (2)" jdkType="Python SDK" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
@ -3,5 +3,5 @@
|
|||||||
<component name="Black">
|
<component name="Black">
|
||||||
<option name="sdkName" value="Python 3.12 (CNSA-276-FP)" />
|
<option name="sdkName" value="Python 3.12 (CNSA-276-FP)" />
|
||||||
</component>
|
</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>
|
</project>
|
10
main.py
10
main.py
@ -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.
|
On Windows, the native WebAuthn API will be used.
|
||||||
"""
|
"""
|
||||||
import time
|
import time
|
||||||
|
import RPI.GPIO as GPIO
|
||||||
import pickle
|
import pickle
|
||||||
import psycopg2
|
import psycopg2
|
||||||
import fido2.webauthn
|
import fido2.webauthn
|
||||||
@ -45,6 +45,8 @@ import ctypes
|
|||||||
from fido2.ctap2 import Ctap2
|
from fido2.ctap2 import Ctap2
|
||||||
|
|
||||||
gotAaguid = None
|
gotAaguid = None
|
||||||
|
GPIO.setmode(GPIO.BCM)
|
||||||
|
GPIO.setup(14, GPIO.OUT)
|
||||||
|
|
||||||
class CliInteraction(UserInteraction):
|
class CliInteraction(UserInteraction):
|
||||||
def prompt_up(self):
|
def prompt_up(self):
|
||||||
@ -181,6 +183,12 @@ while True:
|
|||||||
|
|
||||||
print("Credential authenticated!")
|
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("CLIENT DATA:", result.client_data)
|
||||||
print()
|
print()
|
||||||
print("AUTH DATA:", result.authenticator_data)
|
print("AUTH DATA:", result.authenticator_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user