change enrollment to post
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
8f60e4825e
commit
b177d14e50
|
@ -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
|
||||
|
||||
|
|
13
schema.yml
13
schema.yml
|
@ -22598,8 +22598,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
|
||||
|
@ -22618,7 +22618,7 @@ paths:
|
|||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/AuthenticatorMobileStage'
|
||||
$ref: '#/components/schemas/MobileDeviceEnrollmentCallback'
|
||||
description: ''
|
||||
'400':
|
||||
content:
|
||||
|
@ -34134,6 +34134,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
|
||||
|
|
Reference in New Issue