forked from Yubico/php-yubico
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtwo_factor.php
99 lines (87 loc) · 2.78 KB
/
two_factor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<title></title>
<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
<!--
-->
</style>
</head>
</head>
<body onLoad="document.login.passwordkey.focus();">
<div id="stripe">
</div>
<div id="container">
<div id="logoArea">
<img src="yubicoLogo.jpg" alt="Yubico Logo" width="150" height="75"/>
</div>
<div id="greenBarContent">
<div id="greenBarImage">
<img src="yubikey.jpg" alt="yubikey" width="150" height="89"/>
</div>
<div id="greenBarText">
<h3>Basic Login Demo</h3>
</div>
</div>
<div id="bottomContent">
<h4>Demo YubiKey + password</h4>
<?php include 'authenticate.php';
if ($authenticated == 0) { ?>
<h1 class="ok">Congratulations <?php if ($realname) { print "$realname!"; }?></h1>
<p>You have been successfully authenticated with the YubiKey.
<?php } else { ?>
<ol>
<li>Place your YubiKey in the USB-port.</li>
<li>Enter password.</li>
<li>Touch YubiKey button.</li>
</ol>
<p>No password? You can <a href="admin.php">set password</a> directly.</p>
<br />
<?php if ($authenticated > 0) { ?>
<h1 class="fail">Login failure. Please try again. </h1>
<?php } ?>
<form name="login" method="post" style="border: 1px solid #e5e5e5; background-color: #f1f1f1; padding: 10px; margin: 0px;"
onSubmit="key.value = (key.value).toLowerCase(); return true;">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td width="150">
<b>Password</b>
</td>
<td width="470">
<input autocomplete="off" type="password" name="password">
</td>
</tr>
<tr>
<td colspan=2> </td>
</tr>
<tr>
<td width="150">
<b>YubiKey</b>
</td>
<td width="470">
<input autocomplete="off" type="text" name="key" class="yubiKeyInput"><input type="submit" value="Go" style="border: 0px; font-size: 0px; background: none; padding: 0px; margin: 0px; width: 0px; height: 0px;" />
</td>
</tr>
</table>
</form>
<?php } ?>
<br /><br />
<p>» <a href="two_factor.php">Try again</a></p>
<p>» <a href="one_factor.php">Demo YubiKey only</a></p>
<p>» <a href="two_factor_legacy.php">Demo YubiKey + username/password</a></p>
<p>» <a href="./">Back to main page</a></p>
<br /><br /><br /><br /><br />
<?php if ($authenticated >= 0) { ?>
<h3>Technical details</h3>
More information about the performed transcaction:
<br /><br />
<?php include 'debug.php';
} ?>
</div>
</body>
</html>