web authn working!

This commit is contained in:
2026-01-16 11:25:27 +10:30
parent 2c0aaf484b
commit af0281281a
9 changed files with 240 additions and 61 deletions
+10
View File
@@ -67,6 +67,11 @@ class TOTPVerifyEnrollmentSchema(Schema):
error="Code must be a 6-digit number",
),
)
client_timestamp = fields.Int(
required=False,
allow_none=True,
metadata={"description": "Client UTC timestamp in seconds since epoch for TOTP verification"},
)
class TOTPVerifySchema(Schema):
@@ -74,6 +79,11 @@ class TOTPVerifySchema(Schema):
code = fields.Str(required=True)
is_backup_code = fields.Bool(missing=False)
client_timestamp = fields.Int(
required=False,
allow_none=True,
metadata={"description": "Client UTC timestamp in seconds since epoch for TOTP verification"},
)
class TOTPDisableSchema(Schema):
+2
View File
@@ -22,6 +22,8 @@ class WebAuthnRegistrationCompleteSchema(Schema):
fields.Str(validate=validate.OneOf(["usb", "nfc", "ble", "hybrid", "internal", "platform"])),
load_default=[]
)
# Optional name field for the credential (WebAuthn spec supports this)
name = fields.Str(load_default=None)
@validates_schema
def validate_response(self, data, **kwargs):