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):
"""Enrollment request, send the device's unique identifier"""
device_uid = CharField(required=True)
class MobileDeviceSetPushKeySerializer(PassiveSerializer):
"""Set notification key"""
firebase_key = CharField(required=True)

View File

@ -62,7 +62,7 @@ class AuthenticatorMobileStageView(ChallengeStageView):
data={
# TODO: use cloud gateway?
"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,
}
)

View File

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