stages/authenticator_validate: fix error in passwordless webauthn
closes #3050 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
4c39e08dd4
commit
9add8479ca
|
@ -374,9 +374,9 @@ class AuthenticatorValidateStageView(ChallengeStageView):
|
||||||
# All validation is done by the serializer
|
# All validation is done by the serializer
|
||||||
user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)
|
user = self.executor.plan.context.get(PLAN_CONTEXT_PENDING_USER)
|
||||||
if not user:
|
if not user:
|
||||||
webauthn_device: WebAuthnDevice = response.data.get("webauthn", None)
|
if not "webauthn" not in response.data:
|
||||||
if not webauthn_device:
|
return self.executor.stage_invalid()
|
||||||
return self.executor.stage_ok()
|
webauthn_device: WebAuthnDevice = response.device
|
||||||
self.logger.debug("Set user from user-less flow", user=webauthn_device.user)
|
self.logger.debug("Set user from user-less flow", user=webauthn_device.user)
|
||||||
self.executor.plan.context[PLAN_CONTEXT_PENDING_USER] = webauthn_device.user
|
self.executor.plan.context[PLAN_CONTEXT_PENDING_USER] = webauthn_device.user
|
||||||
self.executor.plan.context[PLAN_CONTEXT_METHOD] = "auth_webauthn_pwl"
|
self.executor.plan.context[PLAN_CONTEXT_METHOD] = "auth_webauthn_pwl"
|
||||||
|
|
Reference in New Issue