change enrollment to post

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-07-24 23:30:18 +02:00
parent cb60fc2c7b
commit 86b69e83e0
No known key found for this signature in database
2 changed files with 22 additions and 8 deletions

View File

@ -30,10 +30,6 @@ class AuthenticatorMobileStageSerializer(StageSerializer):
"configure_flow",
"friendly_name",
]
# extra_kwargs = {
# "client_secret": {"write_only": True},
# "admin_secret_key": {"write_only": True},
# }
class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
@ -48,7 +44,18 @@ class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
search_fields = ["name"]
ordering = ["name"]
@action(methods=["GET"], detail=True)
@extend_schema(
request=OpenApiTypes.NONE,
responses={
200: inline_serializer(
"MobileDeviceEnrollmentCallbackSerializer",
{
"device_token": CharField(required=True),
},
),
},
)
@action(methods=["POST"], detail=True, permission_classes=[])
def enrollment_callback(self, request: Request, pk: str) -> Response:
pass

View File

@ -23422,8 +23422,8 @@ paths:
$ref: '#/components/schemas/GenericError'
description: ''
/stages/authenticator/mobile/{stage_uuid}/enrollment_callback/:
get:
operationId: stages_authenticator_mobile_enrollment_callback_retrieve
post:
operationId: stages_authenticator_mobile_enrollment_callback_create
description: AuthenticatorMobileStage Viewset
parameters:
- in: path
@ -23442,7 +23442,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AuthenticatorMobileStage'
$ref: '#/components/schemas/MobileDeviceEnrollmentCallback'
description: ''
'400':
content:
@ -35122,6 +35122,13 @@ components:
required:
- name
- pk
MobileDeviceEnrollmentCallback:
type: object
properties:
device_token:
type: string
required:
- device_token
MobileDeviceRequest:
type: object
description: Serializer for Mobile authenticator devices