stages/user_logout: fix dependency on PENDING_USER
This commit is contained in:
parent
83013f063d
commit
7b6524357f
|
@ -3,7 +3,6 @@ from django.contrib.auth import logout
|
|||
from django.http import HttpRequest, HttpResponse
|
||||
from structlog import get_logger
|
||||
|
||||
from passbook.flows.planner import PLAN_CONTEXT_PENDING_USER
|
||||
from passbook.flows.stage import AuthenticationStage
|
||||
|
||||
LOGGER = get_logger()
|
||||
|
@ -13,10 +12,10 @@ class UserLogoutStageView(AuthenticationStage):
|
|||
"""Finalise Authentication flow by logging the user in"""
|
||||
|
||||
def get(self, request: HttpRequest) -> HttpResponse:
|
||||
logout(self.request)
|
||||
LOGGER.debug(
|
||||
"Logged out",
|
||||
user=self.executor.plan.context[PLAN_CONTEXT_PENDING_USER],
|
||||
user=request.user,
|
||||
flow_slug=self.executor.flow.slug,
|
||||
)
|
||||
logout(self.request)
|
||||
return self.executor.stage_ok()
|
||||
|
|
Reference in a new issue