summaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2017-04-26 00:11:55 +0200
committerJan-Christoph Borchardt <hey@jancborchardt.net>2017-04-26 00:50:38 +0200
commit241e397326545ee3ecad1a6a50dbe7839faa5c21 (patch)
tree6d33b4e4cc22bb1bf4753d83f44e1bb8422082e3 /core/templates
parent0f0b04b7d9b4fa8c3c74218c222194f0f2f9e8b7 (diff)
parent255c7df3bdbaccf00ba8e9fb00e750ffb9a50356 (diff)
downloadnextcloud-server-241e397326545ee3ecad1a6a50dbe7839faa5c21.tar.gz
nextcloud-server-241e397326545ee3ecad1a6a50dbe7839faa5c21.zip
Merge branch 'master' into contactsmenu
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/loginflow/authpicker.php57
-rw-r--r--core/templates/loginflow/redirect.php37
2 files changed, 94 insertions, 0 deletions
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
new file mode 100644
index 00000000000..c5eb6cb316d
--- /dev/null
+++ b/core/templates/loginflow/authpicker.php
@@ -0,0 +1,57 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+script('core', 'login/authpicker');
+style('core', 'login/authpicker');
+
+/** @var array $_ */
+/** @var \OCP\IURLGenerator $urlGenerator */
+$urlGenerator = $_['urlGenerator'];
+?>
+
+<div class="picker-window">
+ <p class="info">
+ <?php p($l->t('You are about to grant "%s" access to your %s account.', [$_['client'], $_['instanceName']])) ?>
+ </p>
+
+ <br/>
+
+ <p id="redirect-link">
+ <a href="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.redirectPage', ['stateToken' => $_['stateToken']])) ?>">
+ <input type="submit" class="login primary icon-confirm-white" value="<?php p('Grant access') ?>">
+ </a>
+ </p>
+
+ <fieldset id="app-token-login-field" class="hidden">
+ <p class="grouptop">
+ <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')) ?>">
+ <label for="user" class="infield"><?php p($l->t('Username')) ?></label>
+ </p>
+ <p class="groupbottom">
+ <input type="password" name="password" id="password" placeholder="<?php p($l->t('App token')) ?>">
+ <label for="password" class="infield"><?php p($l->t('Password')) ?></label>
+ </p>
+ <input type="hidden" id="serverHost" value="<?php p($_['serverHost']) ?>" />
+ <input id="submit-app-token-login" type="submit" class="login primary icon-confirm-white" value="<?php p('Grant access') ?>">
+ </fieldset>
+</div>
+
+<a id="app-token-login" class="warning" href="#"><?php p($l->t('Alternative login using app token')) ?></a>
diff --git a/core/templates/loginflow/redirect.php b/core/templates/loginflow/redirect.php
new file mode 100644
index 00000000000..7ef0184f61f
--- /dev/null
+++ b/core/templates/loginflow/redirect.php
@@ -0,0 +1,37 @@
+<?php
+/**
+ * @copyright Copyright (c) 2017 Lukas Reschke <lukas@statuscode.ch>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+script('core', 'login/redirect');
+style('core', 'login/authpicker');
+
+/** @var array $_ */
+/** @var \OCP\IURLGenerator $urlGenerator */
+$urlGenerator = $_['urlGenerator'];
+?>
+
+<div class="picker-window">
+ <p class="info"><?php p($l->t('Redirecting …')) ?></p>
+</div>
+
+<form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.generateAppPassword')) ?>">
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" />
+ <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
+ <input id="submit-redirect-form" type="submit" class="hidden "/>
+</form>