From 007676b400ef458d27657e86d65ead344a332e55 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 24 Feb 2021 20:39:39 +0100 Subject: [PATCH] stages/authenticator_validate: fix post from code form --- authentik/stages/authenticator_validate/stage.py | 6 ++---- .../AuthenticatorValidateStageCode.ts | 4 +++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/authentik/stages/authenticator_validate/stage.py b/authentik/stages/authenticator_validate/stage.py index c83cc190b..15c8aa434 100644 --- a/authentik/stages/authenticator_validate/stage.py +++ b/authentik/stages/authenticator_validate/stage.py @@ -34,15 +34,13 @@ class AuthenticatorChallenge(WithUserInfoChallenge): device_challenges = ListField(child=DeviceChallenge()) -class AuthenticatorChallengeResponse(ChallengeResponse): +class AuthenticatorChallengeResponse(ChallengeResponse, DeviceChallenge): """Challenge used for Code-based authenticators""" - response = DeviceChallenge() - request: HttpRequest user: User - def validate_response(self, value: DeviceChallenge): + def validate_challenge(self, value: dict): """Validate response""" return validate_challenge(value, self.request, self.user) diff --git a/web/src/elements/stages/authenticator_validate/AuthenticatorValidateStageCode.ts b/web/src/elements/stages/authenticator_validate/AuthenticatorValidateStageCode.ts index 7d1ad13ba..3bc5101fc 100644 --- a/web/src/elements/stages/authenticator_validate/AuthenticatorValidateStageCode.ts +++ b/web/src/elements/stages/authenticator_validate/AuthenticatorValidateStageCode.ts @@ -33,6 +33,8 @@ export class AuthenticatorValidateStageWebCode extends BaseStage { + +