Add captcha_factor

This commit is contained in:
Jens Langhammer
2018-12-14 13:51:12 +01:00
parent c4cd602fcb
commit 196be4b3b0
8 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,15 @@
"""passbook captcha factor"""
from django.views.generic import FormView
from passbook.captcha_factor.forms import CaptchaForm
from passbook.core.auth.factor import AuthenticationFactor
class CaptchaFactor(FormView, AuthenticationFactor):
"""Simple captcha checker, logic is handeled in django-captcha module"""
form_class = CaptchaForm
def form_valid(self, form):
return self.authenticator.user_ok()