stages/authenticator_webauthn: use correct choices

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-14 10:51:34 +01:00
parent 2981ac7b10
commit 4b2437a6f1
1 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ from django.views import View
from django_otp.models import Device from django_otp.models import Device
from rest_framework.serializers import BaseSerializer from rest_framework.serializers import BaseSerializer
from webauthn.helpers.base64url_to_bytes import base64url_to_bytes from webauthn.helpers.base64url_to_bytes import base64url_to_bytes
from webauthn.helpers.structs import PublicKeyCredentialDescriptor, UserVerificationRequirement from webauthn.helpers.structs import PublicKeyCredentialDescriptor
from authentik.core.types import UserSettingSerializer from authentik.core.types import UserSettingSerializer
from authentik.flows.models import ConfigurableStage, Stage from authentik.flows.models import ConfigurableStage, Stage
@ -26,9 +26,9 @@ class UserVerification(models.TextChoices):
https://www.w3.org/TR/webauthn-2/#enumdef-userverificationrequirement https://www.w3.org/TR/webauthn-2/#enumdef-userverificationrequirement
""" """
REQUIRED = UserVerificationRequirement.REQUIRED REQUIRED = "required"
PREFERRED = UserVerificationRequirement.PREFERRED PREFERRED = "preferred"
DISCOURAGED = UserVerificationRequirement.DISCOURAGED DISCOURAGED = "discouraged"
class AuthenticateWebAuthnStage(ConfigurableStage, Stage): class AuthenticateWebAuthnStage(ConfigurableStage, Stage):