Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/twofactor_u2f.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/style.css14
-rw-r--r--img/u2f.svg6
-rw-r--r--js/challenge.js1
-rw-r--r--lib/Provider/U2FProvider.php2
-rw-r--r--templates/challenge.php8
5 files changed, 26 insertions, 5 deletions
diff --git a/css/style.css b/css/style.css
new file mode 100644
index 0000000..8255aca
--- /dev/null
+++ b/css/style.css
@@ -0,0 +1,14 @@
+/**
+ * Nextcloud - U2F 2FA
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later. See the COPYING file.
+ *
+ * @author Christoph Wurst <christoph@winzerhof-wurst.at>
+ * @copyright Christoph Wurst 2016
+ */
+
+#body-login .wrapper .warning img {
+ width: 100px;
+ margin-left: 80px;
+} \ No newline at end of file
diff --git a/img/u2f.svg b/img/u2f.svg
new file mode 100644
index 0000000..a16bb2c
--- /dev/null
+++ b/img/u2f.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 64 64" height="64" width="64">
+ <g fill="#fff" transform="translate(0 -988.36)">
+ <path d="m49.201 6.3711l-8.931 8.9299-1.084-1.084c-0.719-0.719-1.875-0.719-2.594 0l-29.996 29.994c-0.7191 0.719-0.7191 1.875-0.0003 2.594l10.597 10.599c0.719 0.719 1.877 0.719 2.596 0l29.994-29.996c0.719-0.719 0.719-1.875 0-2.594l-0.795-0.796 8.93-8.93-8.717-8.7169zm-1.064 3.3144l1.17 1.1695-6.198 6.2-1.171-1.172 6.199-6.1975zm0.531 2.7305l1.172 1.172-5.129 5.129-1.172-1.17 5.129-5.131zm1.754 1.693l1.172 1.172-5.129 5.129-1.172-1.172 5.129-5.129zm2.783 0.623l1.17 1.172-6.197 6.198-1.172-1.17 6.199-6.2zm-27.705 16.268a3.5 3.5 0 0 1 3.461 3h7.039v1h-1v2h-1v-2h-1v1h-1v-1h-3.041a3.5 3.5 0 0 1 -3.459 3 3.5 3.5 0 0 1 -3.5 -3.5 3.5 3.5 0 0 1 3.5 -3.5zm0 1a2.5 2.4999 0 0 0 -2.5 2.5 2.5 2.4999 0 0 0 2.5 2.5 2.5 2.4999 0 0 0 2.5 -2.5 2.5 2.4999 0 0 0 -2.5 -2.5z" fill="#fff" stroke-width=".11525px" fill-rule="evenodd" stroke="#000" transform="translate(0 988.36)"/>
+ </g>
+</svg>
diff --git a/js/challenge.js b/js/challenge.js
index a397a71..d2e52f5 100644
--- a/js/challenge.js
+++ b/js/challenge.js
@@ -6,6 +6,7 @@
OCA.TwoFactor_U2F = OCA.TwoFactor_U2F || {};
$(function () {
+ return;
var req = JSON.parse($('#u2f-auth').val());
console.log("sign: ", req);
u2f.sign(req, function (data) {
diff --git a/lib/Provider/U2FProvider.php b/lib/Provider/U2FProvider.php
index c108dbb..13bac58 100644
--- a/lib/Provider/U2FProvider.php
+++ b/lib/Provider/U2FProvider.php
@@ -50,7 +50,7 @@ class U2FProvider implements IProvider {
* @return string
*/
public function getDisplayName() {
- return 'U2F Device';
+ return 'U2F device';
}
/**
diff --git a/templates/challenge.php b/templates/challenge.php
index a0192b2..2a14220 100644
--- a/templates/challenge.php
+++ b/templates/challenge.php
@@ -2,6 +2,7 @@
script('twofactor_u2f', 'vendor/u2f-api');
script('twofactor_u2f', 'challenge');
+style('twofactor_u2f', 'style');
?>
@@ -11,7 +12,6 @@ script('twofactor_u2f', 'challenge');
<input id="challenge" type="hidden" name="challenge">
</form>
-<fieldset class="warning">
- <p><?php p($l->t('Please plug in your U2F device and press the device button to authorize.')) ?></p>
-</fieldset>
-<p><?php p($l->t('Note: Chome is the only browser that supports U2F devices. You need to install the "U2F Support Add-on" on Firefox to use U2F.')) ?></p> \ No newline at end of file
+<img src="<?php print_unescaped(image_path('twofactor_u2f', 'u2f.svg')); ?>">
+<p><?php p($l->t('Please plug in your U2F device and press the device button to authorize.')) ?></p>
+<p><em><?php p($l->t('Chrome is the only browser that supports U2F devices. You need to install the "U2F Support Add-on" on Firefox to use U2F.')) ?></em></p> \ No newline at end of file