2023-09-11 10:15:03 +00:00
|
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
__all__ = ['PasskeySettingSerializer']
|
|
|
|
|
|
|
|
|
|
|
|
class PasskeySettingSerializer(serializers.Serializer):
|
|
|
|
PREFIX_TITLE = _('Passkey')
|
|
|
|
|
|
|
|
AUTH_PASSKEY = serializers.BooleanField(
|
|
|
|
default=False, label=_('Enable passkey Auth'),
|
|
|
|
help_text=_('Only SSL domain can use passkey auth')
|
|
|
|
)
|
|
|
|
FIDO_SERVER_ID = serializers.CharField(
|
|
|
|
max_length=255, label=_('FIDO server ID'), required=False, allow_blank=True,
|
2023-09-12 07:57:53 +00:00
|
|
|
help_text=_(
|
|
|
|
'The hostname can using passkey auth, If not set, '
|
|
|
|
'will use request host and the request host in DOMAINS, '
|
|
|
|
'If multiple domains, use comma to separate'
|
|
|
|
)
|
2023-09-11 10:15:03 +00:00
|
|
|
)
|
|
|
|
FIDO_SERVER_NAME = serializers.CharField(max_length=255, label=_('FIDO server name'))
|