Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
Jens Langhammer 2023-09-04 15:52:48 +02:00
parent 4114c757b9
commit a239084385
No known key found for this signature in database
3 changed files with 12 additions and 2 deletions

View file

@ -29,10 +29,14 @@ class MobileDeviceSerializer(ModelSerializer):
class MobileDeviceEnrollmentSerializer(PassiveSerializer): class MobileDeviceEnrollmentSerializer(PassiveSerializer):
"""Enrollment request, send the device's unique identifier"""
device_uid = CharField(required=True) device_uid = CharField(required=True)
class MobileDeviceSetPushKeySerializer(PassiveSerializer): class MobileDeviceSetPushKeySerializer(PassiveSerializer):
"""Set notification key"""
firebase_key = CharField(required=True) firebase_key = CharField(required=True)

View file

@ -62,7 +62,7 @@ class AuthenticatorMobileStageView(ChallengeStageView):
data={ data={
# TODO: use cloud gateway? # TODO: use cloud gateway?
"u": self.request.build_absolute_uri("/"), "u": self.request.build_absolute_uri("/"),
"s": self.executor.plan.context[FLOW_PLAN_MOBILE_ENROLL].device.pk, "s": str(self.executor.plan.context[FLOW_PLAN_MOBILE_ENROLL].device.pk),
"t": self.executor.plan.context[FLOW_PLAN_MOBILE_ENROLL].token, "t": self.executor.plan.context[FLOW_PLAN_MOBILE_ENROLL].token,
} }
) )

View file

@ -2272,7 +2272,11 @@ paths:
- mobile_device_token: [] - mobile_device_token: []
responses: responses:
'204': '204':
description: No response body content:
application/json:
schema:
type: string
description: ''
'400': '400':
content: content:
application/json: application/json:
@ -35224,6 +35228,7 @@ components:
- token - token
MobileDeviceEnrollmentRequest: MobileDeviceEnrollmentRequest:
type: object type: object
description: Enrollment request, send the device's unique identifier
properties: properties:
device_uid: device_uid:
type: string type: string
@ -35247,6 +35252,7 @@ components:
- name - name
MobileDeviceSetPushKeyRequest: MobileDeviceSetPushKeyRequest:
type: object type: object
description: Set notification key
properties: properties:
firebase_key: firebase_key:
type: string type: string