-
Notifications
You must be signed in to change notification settings - Fork 27
/
index.html
147 lines (126 loc) · 3.73 KB
/
index.html
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<!DOCTYPE html>
<html lang="en">
<head>
<title>WebAuthn checker - W3C Level 1 Mode</title>
<meta charset="utf-8"/>
<script type="text/javascript" src="assets/jquery.min.js"></script>
<script type="text/javascript" src="base64.js"></script>
<script type="text/javascript" src="pkijs/common.js"></script>
<script type="text/javascript" src="pkijs/asn1.js"></script>
<script type="text/javascript" src="pkijs/x509_schema.js"></script>
<script type="text/javascript" src="pkijs/x509_simpl.js"></script>
<script type="text/javascript" src="cbor.js"></script>
<script type="text/javascript" src="u2f-api.js"></script>
<script type="text/javascript" src="driver.js"></script>
<style>
* {
margin: 0;
padding: 0;
}
body {
text-align: left;
font-size: 10pt;
font-family: system, Helvetica, sans-serif;
}
#container {
width: 600px;
margin: 0 auto;
margin-top: 1em;
}
#error {
font-size: 150%;
font-weight: bold;
text-align: center;
}
.row {
margin-top: 1em;
margin-bottom: 1em;
}
.row ol {
margin-left: 2em;
}
.box {
border: 1px solid grey;
padding: 3px;
margin-bottom: 10px;
}
.subtitle {
font-style: italic;
}
button {
background-color: black;
color: white;
border: 1px solid black;
padding: 1ex;
width: 100%;
}
button:active {
background-color: #303;
}
input {
margin-bottom: 20px;
}
pre {
width: 560px;
height: 20em;
overflow: scroll;
background-color: #eee;
border: 1px solid #999;
margin: 1em 0;
}
.inactive {
background-color: #999;
}
.success {
background-color: #dfd;
}
.todo {
background-color: #dff;
}
.failure {
background-color: #fdd;
}
</style>
</head>
<body>
<div id="container">
<div class="row">
<p><strong>This is the Level 1 attestation mode checker. It's a <big>work-in-progress</big>.</strong>. Code is <a href="https://github.com/jcjones/webauthn.bin.coffee/">on Github</a>, though deployment is manual.</p>
<p>You can <a href="/iframe.html">open this page inside an iframe for testing</a> as well, or <a href="https://u2f.bin.coffee/iframe-webauthn.html">open a cross-origin iframe (which is prohibited and will give an error)</a>.</p>
<p>You can also load <a href="https://webauthn.bin.coffee:8443">this page on port 8443 to test</a> that alternate ports work for a given RP ID.</p>
</div>
<div class="row">
<p>To use this to test Web Authentication support in Firefox, be sure you're using Firefox 60 or later.</p>
</div>
<div class="row">
<p id="error"></p>
<!-- registration -->
<div class="box">
<button id="createButton">Create Credential</button>
<pre id="createOut"></pre>
</div>
<!-- sign -->
<div class="box">
<button id="getButton">Get Assertion</button>
<pre id="getOut"></pre>
</div>
<div class="box">
<p class="subtitle">Advanced</p>
<p>Relying Party ID to use. "<tt>bin.coffee</tt>" and "<tt>webauthn.bin.coffee</tt>" should be the only valid options. Ports, paths, schema and such should be forbidden.</p>
<input id="rpIdText" type="text" size="50"/>
<p>Attestation type.</p>
<select id="attestationType">
<option value="">--Unspecified--</option>
<option value="direct">Direct</option>
<option value="indirect">Indirect</option>
<option value="none">None</option>
</select>
<p>FIDO AppID to use. (If set, will use U2F for registration and the AppID compatibility extension. "<tt>https://bin.coffee/AppId</tt>" and "<tt>https://webauthn.bin.coffee/</tt>" are valid options for Firefox. Only "<tt>https://webauthn.bin.coffee/</tt>" is valid for Chrome.)</p>
<input id="appIdText" type="text" size="50"/>
<p>Should this page aggressively loop forever on an operation? (Test denial-of-service to WebAuthn)</p>
<input id="loopForever" type="checkbox"/>
</div>
</div>
</div>
</body>
</html>