fix lint
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
ccb2d0aaed
commit
a895157be1
|
@ -54,7 +54,7 @@ class AuthenticatorMobileStageViewSet(UsedByMixin, ModelViewSet):
|
|||
)
|
||||
@action(methods=["POST"], detail=True, permission_classes=[])
|
||||
def enrollment_callback(self, request: Request, pk: str) -> Response:
|
||||
pass
|
||||
"""Enrollment callback"""
|
||||
|
||||
|
||||
class MobileDeviceSerializer(ModelSerializer):
|
||||
|
|
|
@ -80,6 +80,8 @@ class MobileDevice(SerializerModel, Device):
|
|||
|
||||
|
||||
class MobileDeviceToken(ExpiringModel):
|
||||
"""Mobile device token"""
|
||||
|
||||
device = models.ForeignKey(MobileDevice, on_delete=models.CASCADE, null=True)
|
||||
user = models.ForeignKey(get_user_model(), on_delete=models.CASCADE)
|
||||
token = models.TextField(default=default_token_key)
|
||||
|
|
|
@ -42,6 +42,7 @@ class AuthenticatorMobileStageView(ChallengeStageView):
|
|||
response_class = AuthenticatorMobileChallengeResponse
|
||||
|
||||
def prepare(self):
|
||||
"""Prepare the token"""
|
||||
if FLOW_PLAN_MOBILE_ENROLL in self.executor.plan.context:
|
||||
return
|
||||
token = MobileDeviceToken.objects.create(
|
||||
|
|
|
@ -23424,7 +23424,7 @@ paths:
|
|||
/stages/authenticator/mobile/{stage_uuid}/enrollment_callback/:
|
||||
post:
|
||||
operationId: stages_authenticator_mobile_enrollment_callback_create
|
||||
description: AuthenticatorMobileStage Viewset
|
||||
description: Enrollment callback
|
||||
parameters:
|
||||
- in: path
|
||||
name: stage_uuid
|
||||
|
|
Reference in New Issue