1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-21 21:55:43 +02:00

Add login-otp plugin

This commit is contained in:
Jakub Vrana
2018-02-22 11:36:11 +01:00
parent 4355aaa96f
commit 00721402e0
4 changed files with 81 additions and 17 deletions

View File

@@ -71,17 +71,18 @@ class Adminer {
}
function loginForm() {
?>
<table cellspacing="0">
<tr><th><?php echo lang('Username'); ?><td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="<?php echo h($_GET["username"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Password'); ?><td><input type="password" name="auth[password]">
</table>
<?php
echo script("focus(qs('#username'));");
echo "<table cellspacing='0'>\n";
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td><input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" id="username" value="' . h($_GET["username"]) . '" autocapitalize="off">' . script("focus(qs('#username'));"));
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td><input type="password" name="auth[password]">' . "\n");
echo "</table>\n";
echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
}
function loginFormField($name, $default) {
return $default;
}
function login($login, $password) {
return true;
}