authentik.stages.dummy.models
dummy stage models
1"""dummy stage models""" 2 3from django.db import models 4from django.utils.translation import gettext as _ 5from django.views import View 6from rest_framework.serializers import BaseSerializer 7 8from authentik.flows.models import Stage 9 10 11class DummyStage(Stage): 12 """Used for debugging.""" 13 14 throw_error = models.BooleanField(default=False) 15 16 __debug_only__ = True 17 18 @property 19 def serializer(self) -> type[BaseSerializer]: 20 from authentik.stages.dummy.api import DummyStageSerializer 21 22 return DummyStageSerializer 23 24 @property 25 def view(self) -> type[View]: 26 from authentik.stages.dummy.stage import DummyStageView 27 28 return DummyStageView 29 30 @property 31 def component(self) -> str: 32 return "ak-stage-dummy-form" 33 34 class Meta: 35 verbose_name = _("Dummy Stage") 36 verbose_name_plural = _("Dummy Stages")
12class DummyStage(Stage): 13 """Used for debugging.""" 14 15 throw_error = models.BooleanField(default=False) 16 17 __debug_only__ = True 18 19 @property 20 def serializer(self) -> type[BaseSerializer]: 21 from authentik.stages.dummy.api import DummyStageSerializer 22 23 return DummyStageSerializer 24 25 @property 26 def view(self) -> type[View]: 27 from authentik.stages.dummy.stage import DummyStageView 28 29 return DummyStageView 30 31 @property 32 def component(self) -> str: 33 return "ak-stage-dummy-form" 34 35 class Meta: 36 verbose_name = _("Dummy Stage") 37 verbose_name_plural = _("Dummy Stages")
Used for debugging.
def
throw_error(unknown):
A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
serializer: type[rest_framework.serializers.BaseSerializer]
19 @property 20 def serializer(self) -> type[BaseSerializer]: 21 from authentik.stages.dummy.api import DummyStageSerializer 22 23 return DummyStageSerializer
Get serializer for this model
view: type[django.views.generic.base.View]
25 @property 26 def view(self) -> type[View]: 27 from authentik.stages.dummy.stage import DummyStageView 28 29 return DummyStageView
Return StageView class that implements logic for this stage
stage_ptr
Accessor to the related object on the forward side of a one-to-one relation.
In the example::
class Restaurant(Model):
place = OneToOneField(Place, related_name='restaurant')
Restaurant.place is a ForwardOneToOneDescriptor instance.
Inherited Members
- authentik.flows.models.Stage
- stage_uuid
- name
- objects
- ui_user_settings
- is_in_memory
- flow_set
- flowstagebinding_set
- emailstage
- endpointstage
- invitationstage
- passwordstage
- promptstage
- authenticatorstaticstage
- authenticatorduostage
- authenticatoremailstage
- authenticatorsmsstage
- authenticatorwebauthnstage
- authenticatorvalidatestage
- captchastage
- identificationstage
- authenticatortotpstage
- consentstage
- denystage
- dummystage
- redirectstage
- userdeletestage
- userloginstage
- userlogoutstage
- userwritestage
- authenticatorendpointgdtcstage
- mutualtlsstage
- sourcestage
The requested object does not exist
The query returned multiple objects when only one was expected.