authentik.stages.user_logout.models
logout stage models
1"""logout stage models""" 2 3from django.utils.translation import gettext_lazy as _ 4from django.views import View 5from rest_framework.serializers import BaseSerializer 6 7from authentik.flows.models import Stage 8 9 10class UserLogoutStage(Stage): 11 """Ends the user's session.""" 12 13 @property 14 def serializer(self) -> type[BaseSerializer]: 15 from authentik.stages.user_logout.api import UserLogoutStageSerializer 16 17 return UserLogoutStageSerializer 18 19 @property 20 def view(self) -> type[View]: 21 from authentik.stages.user_logout.stage import UserLogoutStageView 22 23 return UserLogoutStageView 24 25 @property 26 def component(self) -> str: 27 return "ak-stage-user-logout-form" 28 29 class Meta: 30 verbose_name = _("User Logout Stage") 31 verbose_name_plural = _("User Logout Stages")
11class UserLogoutStage(Stage): 12 """Ends the user's session.""" 13 14 @property 15 def serializer(self) -> type[BaseSerializer]: 16 from authentik.stages.user_logout.api import UserLogoutStageSerializer 17 18 return UserLogoutStageSerializer 19 20 @property 21 def view(self) -> type[View]: 22 from authentik.stages.user_logout.stage import UserLogoutStageView 23 24 return UserLogoutStageView 25 26 @property 27 def component(self) -> str: 28 return "ak-stage-user-logout-form" 29 30 class Meta: 31 verbose_name = _("User Logout Stage") 32 verbose_name_plural = _("User Logout Stages")
Ends the user's session.
serializer: type[rest_framework.serializers.BaseSerializer]
14 @property 15 def serializer(self) -> type[BaseSerializer]: 16 from authentik.stages.user_logout.api import UserLogoutStageSerializer 17 18 return UserLogoutStageSerializer
Get serializer for this model
view: type[django.views.generic.base.View]
20 @property 21 def view(self) -> type[View]: 22 from authentik.stages.user_logout.stage import UserLogoutStageView 23 24 return UserLogoutStageView
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
class
UserLogoutStage.MultipleObjectsReturned(authentik.flows.models.Stage.MultipleObjectsReturned):
The query returned multiple objects when only one was expected.