2022-06-07 11:26:07 +00:00
|
|
|
from rest_framework import serializers
|
|
|
|
|
|
|
|
from common.drf.fields import EncryptedField
|
2022-07-04 03:29:39 +00:00
|
|
|
from ..const import ConfirmType, MFAType
|
2022-06-07 11:26:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ConfirmSerializer(serializers.Serializer):
|
2022-07-04 03:29:39 +00:00
|
|
|
confirm_type = serializers.ChoiceField(required=True, allow_blank=True, choices=ConfirmType.choices)
|
|
|
|
mfa_type = serializers.ChoiceField(required=False, allow_blank=True, choices=MFAType.choices)
|
2022-07-07 09:07:57 +00:00
|
|
|
secret_key = EncryptedField(allow_blank=True)
|