mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
789 B
30 lines
789 B
# -*- coding: utf-8 -*- |
|
# |
|
from rest_framework import serializers |
|
|
|
from common.drf.fields import EncryptedField |
|
|
|
__all__ = [ |
|
'MFAChallengeSerializer', 'MFASelectTypeSerializer', |
|
'PasswordVerifySerializer', |
|
] |
|
|
|
|
|
class PasswordVerifySerializer(serializers.Serializer): |
|
password = EncryptedField() |
|
|
|
|
|
class MFASelectTypeSerializer(serializers.Serializer): |
|
type = serializers.CharField() |
|
username = serializers.CharField(required=False, allow_blank=True, allow_null=True) |
|
|
|
|
|
class MFAChallengeSerializer(serializers.Serializer): |
|
type = serializers.CharField(write_only=True, required=False, allow_blank=True) |
|
code = serializers.CharField(write_only=True) |
|
|
|
def create(self, validated_data): |
|
pass |
|
|
|
def update(self, instance, validated_data): |
|
pass
|
|
|