diff --git a/authentik/stages/authenticator_static/api.py b/authentik/stages/authenticator_static/api.py index c32ed5443..9a27d31e5 100644 --- a/authentik/stages/authenticator_static/api.py +++ b/authentik/stages/authenticator_static/api.py @@ -30,7 +30,7 @@ class StaticDeviceSerializer(ModelSerializer): class Meta: model = StaticDevice - fields = ["name", "token_set"] + fields = ["name", "token_set", "pk"] depth = 2 diff --git a/authentik/stages/authenticator_totp/api.py b/authentik/stages/authenticator_totp/api.py index c5a093221..12e748e90 100644 --- a/authentik/stages/authenticator_totp/api.py +++ b/authentik/stages/authenticator_totp/api.py @@ -32,6 +32,7 @@ class TOTPDeviceSerializer(ModelSerializer): model = TOTPDevice fields = [ "name", + "pk", ] depth = 2 diff --git a/authentik/stages/authenticator_webauthn/api.py b/authentik/stages/authenticator_webauthn/api.py index 9ee607887..3830fed6c 100644 --- a/authentik/stages/authenticator_webauthn/api.py +++ b/authentik/stages/authenticator_webauthn/api.py @@ -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 diff --git a/swagger.yaml b/swagger.yaml index 815c6a13b..2dcde19bd 100755 --- a/swagger.yaml +++ b/swagger.yaml @@ -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: