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",
|
"configure_flow",
|
||||||
"friendly_name",
|
"friendly_name",
|
||||||
]
|
]
|
||||||
# extra_kwargs = {
|
|
||||||
# "client_secret": {"write_only": True},
|
|
||||||
# "admin_secret_key": {"write_only": True},
|
|
||||||
# }
|
|
||||||
|
|
||||||
|
|
||||||
class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
|
class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
|
||||||
|
@ -48,7 +44,18 @@ class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
ordering = ["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:
|
def enrollment_callback(self, request: Request, pk: str) -> Response:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
13
schema.yml
13
schema.yml
|
@ -22598,8 +22598,8 @@ paths:
|
||||||
$ref: '#/components/schemas/GenericError'
|
$ref: '#/components/schemas/GenericError'
|
||||||
description: ''
|
description: ''
|
||||||
/stages/authenticator/mobile/{stage_uuid}/enrollment_callback/:
|
/stages/authenticator/mobile/{stage_uuid}/enrollment_callback/:
|
||||||
get:
|
post:
|
||||||
operationId: stages_authenticator_mobile_enrollment_callback_retrieve
|
operationId: stages_authenticator_mobile_enrollment_callback_create
|
||||||
description: AuthenticatorMobileStage Viewset
|
description: AuthenticatorMobileStage Viewset
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
|
@ -22618,7 +22618,7 @@ paths:
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/components/schemas/AuthenticatorMobileStage'
|
$ref: '#/components/schemas/MobileDeviceEnrollmentCallback'
|
||||||
description: ''
|
description: ''
|
||||||
'400':
|
'400':
|
||||||
content:
|
content:
|
||||||
|
@ -34134,6 +34134,13 @@ components:
|
||||||
required:
|
required:
|
||||||
- name
|
- name
|
||||||
- pk
|
- pk
|
||||||
|
MobileDeviceEnrollmentCallback:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
device_token:
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- device_token
|
||||||
MobileDeviceRequest:
|
MobileDeviceRequest:
|
||||||
type: object
|
type: object
|
||||||
description: Serializer for Mobile authenticator devices
|
description: Serializer for Mobile authenticator devices
|
||||||
|
|
Reference in New Issue