From abeeba71672a711dab98194bb8ae751ee95e3385 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Tue, 31 Mar 2015 22:48:14 -0400 Subject: Add two factor authentication --- app/Template/twofactor/check.php | 10 ++++++++++ app/Template/twofactor/index.php | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 app/Template/twofactor/check.php create mode 100644 app/Template/twofactor/index.php (limited to 'app/Template/twofactor') diff --git a/app/Template/twofactor/check.php b/app/Template/twofactor/check.php new file mode 100644 index 00000000..af64bc76 --- /dev/null +++ b/app/Template/twofactor/check.php @@ -0,0 +1,10 @@ +
+ + formCsrf() ?> + formLabel(t('Code'), 'code') ?> + formText('code', array(), array(), array('placeholder="123456"'), 'form-numeric') ?> + +
+ +
+
\ No newline at end of file diff --git a/app/Template/twofactor/index.php b/app/Template/twofactor/index.php new file mode 100644 index 00000000..bc9a12e9 --- /dev/null +++ b/app/Template/twofactor/index.php @@ -0,0 +1,37 @@ + + +
+ + formCsrf() ?> + formCheckbox('twofactor_activated', t('Enable/disable two factor authentication'), 1, isset($user['twofactor_activated']) && $user['twofactor_activated'] == 1) ?> + +
+ +
+
+ + +
+

e($user['twofactor_secret']) ?> (base32)

+




+

+ e($key_url) ?> +

+ +

+
+ +

+
+ + formCsrf() ?> + formLabel(t('Code'), 'code') ?> + formText('code', array(), array(), array('placeholder="123456"'), 'form-numeric') ?> + +
+ +
+
+ -- cgit v1.2.3