stages/authenticator_*: fix missing fields

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-03-24 17:19:39 +01:00
parent f41f2bfdab
commit f695a3f40a
4 changed files with 28 additions and 5 deletions

View File

@ -30,7 +30,7 @@ class StaticDeviceSerializer(ModelSerializer):
class Meta:
model = StaticDevice
fields = ["name", "token_set"]
fields = ["name", "token_set", "pk"]
depth = 2

View File

@ -32,6 +32,7 @@ class TOTPDeviceSerializer(ModelSerializer):
model = TOTPDevice
fields = [
"name",
"pk",
]
depth = 2

View File

@ -16,7 +16,7 @@ class AuthenticateWebAuthnStageSerializer(StageSerializer):
class Meta:
model = AuthenticateWebAuthnStage
fields = StageSerializer.Meta.fields
fields = StageSerializer.Meta.fields + ["configure_flow"]
class AuthenticateWebAuthnStageViewSet(ModelViewSet):
@ -32,9 +32,7 @@ class WebAuthnDeviceSerializer(ModelSerializer):
class Meta:
model = WebAuthnDevice
fields = [
"name",
]
fields = ["pk", "name", "created_on"]
depth = 2

View File

@ -10786,6 +10786,10 @@ definitions:
type: integer
readOnly: true
readOnly: true
pk:
title: ID
type: integer
readOnly: true
TOTPDevice:
description: Serializer for totp authenticator devices
required:
@ -10798,17 +10802,30 @@ definitions:
type: string
maxLength: 64
minLength: 1
pk:
title: ID
type: integer
readOnly: true
WebAuthnDevice:
description: Serializer for WebAuthn authenticator devices
required:
- name
type: object
properties:
pk:
title: ID
type: integer
readOnly: true
name:
title: Name
type: string
maxLength: 200
minLength: 1
created_on:
title: Created on
type: string
format: date-time
readOnly: true
Provider:
title: Provider
description: Provider Serializer
@ -14014,6 +14031,13 @@ definitions:
type: array
items:
$ref: '#/definitions/Flow'
configure_flow:
title: Configure flow
description: Flow used by an authenticated user to configure this Stage. If
empty, user will not be able to configure this stage.
type: string
format: uuid
x-nullable: true
CaptchaStage:
description: CaptchaStage Serializer
required: