diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b9ce26d..633b5033 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ All notable changes to this project will be documented in this file. - Change the "Test Integration" behavior for webhooks: don't retry failed requests - Add retries to the the email sending logic - Require confirmation codes (sent to email) before sensitive actions -- Implement Webauthn two-factor authentication +- Implement WebAuthn two-factor authentication ## v1.17.0 - 2020-10-14 diff --git a/hc/accounts/forms.py b/hc/accounts/forms.py index 3718e5f6..f9838438 100644 --- a/hc/accounts/forms.py +++ b/hc/accounts/forms.py @@ -135,7 +135,7 @@ class AddCredentialForm(forms.Form): attestation_object = Base64Field() -class WebauthnForm(forms.Form): +class WebAuthnForm(forms.Form): credential_id = Base64Field() client_data_json = Base64Field() authenticator_data = Base64Field() diff --git a/hc/accounts/tests/test_login_webauthn.py b/hc/accounts/tests/test_login_webauthn.py index 0b2b83a6..092c3296 100644 --- a/hc/accounts/tests/test_login_webauthn.py +++ b/hc/accounts/tests/test_login_webauthn.py @@ -5,7 +5,7 @@ from hc.test import BaseTestCase @override_settings(RP_ID="testserver") -class LoginWebauthnTestCase(BaseTestCase): +class LoginWebAuthnTestCase(BaseTestCase): def setUp(self): super().setUp() diff --git a/hc/accounts/views.py b/hc/accounts/views.py index 5ccff378..86e9baee 100644 --- a/hc/accounts/views.py +++ b/hc/accounts/views.py @@ -575,7 +575,7 @@ def remove_project(request, code): def _get_credential_data(request, form): - """ Complete Webauthn registration, return binary credential data. + """ Complete WebAuthn registration, return binary credential data. This function is an interface to the fido2 library. It is separated out so that we don't need to mock ClientData, AttestationObject, @@ -652,7 +652,7 @@ def remove_credential(request, code): def _check_credential(request, form, credentials): - """ Complete Webauthn authentication, return True on success. + """ Complete WebAuthn authentication, return True on success. This function is an interface to the fido2 library. It is separated out so that we don't need to mock ClientData, AuthenticatorData, @@ -684,7 +684,7 @@ def login_webauthn(request): credentials = [c.unpack() for c in user.credentials.all()] if request.method == "POST": - form = forms.WebauthnForm(request.POST) + form = forms.WebAuthnForm(request.POST) if not form.is_valid(): return HttpResponseBadRequest() diff --git a/hc/settings.py b/hc/settings.py index cb925aae..2ca152c1 100644 --- a/hc/settings.py +++ b/hc/settings.py @@ -164,7 +164,7 @@ STATICFILES_FINDERS = ( COMPRESS_OFFLINE = True COMPRESS_CSS_HASHING_METHOD = "content" -# Webauthn +# WebAuthn RP_ID = os.getenv("RP_ID") # Discord integration