From 0b280c0a477c587d11adb091df8821e7dc16db0b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 23 Aug 2021 17:26:07 +0200 Subject: [PATCH] website: fix example flows using incorrect backend Signed-off-by: Jens Langhammer --- authentik/stages/password/tests.py | 2 +- website/static/flows/login-2fa.akflow | 3 ++- website/static/flows/login-conditional-captcha.akflow | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/authentik/stages/password/tests.py b/authentik/stages/password/tests.py index b30a3187c..ea4100d78 100644 --- a/authentik/stages/password/tests.py +++ b/authentik/stages/password/tests.py @@ -158,7 +158,7 @@ class TestPasswordStage(TestCase): TO_STAGE_RESPONSE_MOCK, ) @patch( - "django.contrib.auth.backends.ModelBackend.authenticate", + "authentik.core.auth.InbuiltBackend.authenticate", MOCK_BACKEND_AUTHENTICATE, ) def test_permission_denied(self): diff --git a/website/static/flows/login-2fa.akflow b/website/static/flows/login-2fa.akflow index 35e9fc87c..f7eecc83c 100644 --- a/website/static/flows/login-2fa.akflow +++ b/website/static/flows/login-2fa.akflow @@ -52,7 +52,8 @@ "model": "authentik_stages_password.passwordstage", "attrs": { "backends": [ - "django.contrib.auth.backends.ModelBackend", + "authentik.core.auth.InbuiltBackend", + "authentik.core.auth.TokenBackend", "authentik.sources.ldap.auth.LDAPBackend" ] } diff --git a/website/static/flows/login-conditional-captcha.akflow b/website/static/flows/login-conditional-captcha.akflow index f5e040ad8..d7b16a98c 100644 --- a/website/static/flows/login-conditional-captcha.akflow +++ b/website/static/flows/login-conditional-captcha.akflow @@ -55,7 +55,8 @@ "model": "authentik_stages_password.passwordstage", "attrs": { "backends": [ - "django.contrib.auth.backends.ModelBackend", + "authentik.core.auth.InbuiltBackend", + "authentik.core.auth.TokenBackend", "authentik.sources.ldap.auth.LDAPBackend" ] }