-
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'gh/django/upgrade-two-factor-auth' into autostaging
- Loading branch information
Showing
20 changed files
with
117 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
corehq/apps/domain/templates/login_and_password/two_factor/core/login.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{% load i18n two_factor %} | ||
{% load i18n phonenumber %} | ||
|
||
{% block focus-content %} | ||
<h2 class="text-center"> | ||
|
2 changes: 1 addition & 1 deletion
2
corehq/apps/domain/templates/login_and_password/two_factor/core/login_form.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
corehq/apps/domain/templates/login_and_password/two_factor/core/phone_register.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 37 additions & 23 deletions
60
corehq/apps/domain/templates/login_and_password/two_factor/core/setup.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
corehq/apps/domain/templates/login_and_password/two_factor/profile/profile.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
from two_factor.plugins.phonenumber.method import PhoneCallMethod, SMSMethod | ||
from two_factor.plugins.registry import GeneratorMethod | ||
|
||
from corehq.apps.settings.forms import HQPhoneNumberForm, HQTOTPDeviceForm | ||
|
||
|
||
class HQGeneratorMethod(GeneratorMethod): | ||
|
||
form_path = 'corehq.apps.settings.forms.HQTOTPDeviceForm' | ||
|
||
def get_setup_forms(self, *args): | ||
return {self.code: HQTOTPDeviceForm} | ||
|
||
|
||
class HQPhoneCallMethod(PhoneCallMethod): | ||
|
||
form_path = 'corehq.apps.settings.forms.HQPhoneNumberForm' | ||
|
||
def get_setup_forms(self, *args): | ||
return {self.code: HQPhoneNumberForm} | ||
|
||
|
||
class HQSMSMethod(SMSMethod): | ||
|
||
form_path = 'corehq.apps.settings.forms.HQPhoneNumberForm' | ||
|
||
def get_setup_forms(self, *args): | ||
return {self.code: HQPhoneNumberForm} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.