forked from CGM_Public/pretix_original
Update webauthn requirement from ==0.4.* to ==2.0.* (#3880)
* Get rid of unmaintained dependency python-u2flib-server * Update webauthn requirement from ==0.4.* to ==2.0.* * Fix tests * Update src/pretix/control/views/auth.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Update src/pretix/control/views/auth.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Update src/pretix/control/views/user.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Update src/pretix/control/views/user.py Co-authored-by: Richard Schreiber <schreiber@rami.io> * Update src/pretix/control/views/user.py Co-authored-by: Richard Schreiber <schreiber@rami.io> --------- Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -40,7 +40,9 @@ from django_otp.oath import TOTP
|
||||
from django_otp.plugins.otp_static.models import StaticDevice
|
||||
from django_otp.plugins.otp_totp.models import TOTPDevice
|
||||
from tests.base import SoupTest, extract_form_fields
|
||||
from webauthn import WebAuthnCredential
|
||||
from webauthn.registration.verify_registration_response import (
|
||||
VerifiedRegistration,
|
||||
)
|
||||
|
||||
from pretix.base.models import (
|
||||
Event, Organizer, U2FDevice, User, WebAuthnDevice,
|
||||
@@ -356,9 +358,9 @@ class UserSettings2FATest(SoupTest):
|
||||
}, follow=True)
|
||||
|
||||
m = self.monkeypatch
|
||||
m.setattr("webauthn.WebAuthnRegistrationResponse.verify",
|
||||
lambda *args, **kwargs: WebAuthnCredential(
|
||||
'', '', b'asd', b'foo', 1
|
||||
m.setattr("webauthn.verify_registration_response",
|
||||
lambda *args, **kwargs: VerifiedRegistration(
|
||||
b'', b'', 1, '', 'foo', 'public-key', True, b'', 'single_device', True
|
||||
))
|
||||
|
||||
d = WebAuthnDevice.objects.first()
|
||||
|
||||
Reference in New Issue
Block a user