-
Notifications
You must be signed in to change notification settings - Fork 0
/
password_meter.html
300 lines (245 loc) · 10.7 KB
/
password_meter.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<!-- Text spinners style -->
<link href="css/plugins/textSpinners/spinners.css" rel="stylesheet">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="row">
<div class="col-lg-12">
<div class="ibox ">
<div class="ibox-title">
<h5>Password meter</h5>
</div>
<div class="ibox-content">
<p class="font-bold">
Password Strength Meter for Twitter Bootstrap
</p>
<p>The jQuery Password Strength Meter is a plugin for Twitter Bootstrap that provides rulesets for visualy displaying the quality of a users typed in password.</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="ibox ">
<div class="ibox-title">
<h5>Basic example </h5>
</div>
<div class="ibox-content">
<form role="form">
<div class="row" id="pwd-container1">
<div class="col-sm-12">
<div class="form-group">
<label for="password1">Password</label>
<input type="password" class="form-control example1" id="password1" placeholder="Password" value="Passwo">
</div>
<div class="form-group">
<div class="pwstrength_viewport_progress"></div>
</div>
</div>
</div>
</form>
<pre>
var options1 = {};
options1.ui = {
container: "#pwd-container",
showVerdictsInsideProgressBar: true,
viewports: {
progress: ".pwstrength_viewport_progress"
}
};
options1.common = {
debug: false
};
$('.example1').pwstrength(options1);
</pre>
</div>
</div>
</div>
<div class="col-md-6">
<div class="ibox ">
<div class="ibox-title">
<h5>Show the password strength as a status in the field </h5>
</div>
<div class="ibox-content">
<form role="form">
<div class="row" id="pwd-container2">
<div class="col-sm-12">
<div class="form-group">
<label for="password2">Password</label>
<input type="password" class="form-control example2" id="password2" placeholder="Password" value="Pass">
</div>
<div class="form-group">
<div class="pwstrength_viewport_verdict"></div>
</div>
</div>
</div>
</form>
<pre>
var options2 = {};
options1.ui = {
container: "#pwd-container2",
showStatus: true,
showProgressBar: false,
viewports: {
verdict: ".pwstrength_viewport_verdict"
}
};
$('.example2').pwstrength(options2);
</pre>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="ibox ">
<div class="ibox-title">
<h5>Interact with other inputs </h5>
</div>
<div class="ibox-content">
<form role="form">
<div class="row" id="pwd-container3">
<div class="col-sm-12">
<div class="form-group">
<label for="username">Username</label>
<input type="text" class="form-control" id="username" placeholder="Username">
</div>
<div class="form-group">
<label for="password3">Password</label>
<input type="password" class="form-control example3" id="password3" placeholder="Password">
</div>
<div class="form-group">
<div class="pwstrength_viewport_progress2"></div>
</div>
</div>
</div>
</form>
<pre>
var options3 = {};
options3.ui = {
container: "#pwd-container3",
showVerdictsInsideProgressBar: true,
viewports: {
progress: ".pwstrength_viewport_progress2"
}
};
options3.common = {
debug: true,
usernameField: "#username"
};
$('.example3').pwstrength(options3);
</pre>
</div>
</div>
</div>
<div class="col-md-6">
<div class="ibox ">
<div class="ibox-title">
<h5>Use zxcvbn to calculate the password strength</h5>
</div>
<div class="ibox-content">
<form role="form">
<div class="row" id="pwd-container4">
<div class="col-sm-12">
<div class="form-group">
<label for="year">Year of birth</label>
<input type="text" class="form-control" id="year" value="2016">
</div>
<div class="form-group">
<label for="familyname">Family Name</label>
<input type="text" class="form-control" id="familyname" placeholder="Name" value="Tokugawa">
</div>
<div class="form-group">
<label for="password4">Password</label>
<input type="password" class="form-control example4" id="password4" placeholder="Password">
</div>
<div class="form-group">
<span class="font-bold pwstrength_viewport_verdict4"></span>
<span class="pwstrength_viewport_progress4"></span>
<p>The content of the form inputs and the words <em>samurai, shogun, bushido, daisho</em> and <em>seppuku</em> are disrecommended in the password, and the score will adjust properly.</p>
</div>
</div>
</div>
</form>
<pre>
var options4 = {};
options4.ui = {
container: "#pwd-container4",
viewports: {
progress: ".pwstrength_viewport_progress4",
verdict: ".pwstrength_viewport_verdict4"
}
};
options4.common = {
zxcvbn: true,
zxcvbnTerms: ['samurai', 'shogun', 'bushido', 'daisho', 'seppuku'],
userInputs: ['#year', '#familyname']
};
$('.example4').pwstrength(options4);
</pre>
</div>
</div>
</div>
</div>
</div>
<!-- Mainly scripts -->
<!-- Custom and plugin javascript -->
<script src="js/common.js"></script>
<!-- Password meter -->
<script src="js/plugins/pwstrength/pwstrength-bootstrap.min.js"></script>
<script src="js/plugins/pwstrength/zxcvbn.js"></script>
<script>
$(document).ready(function(){
// Example 1
var options1 = {};
options1.ui = {
container: "#pwd-container1",
showVerdictsInsideProgressBar: true,
viewports: {
progress: ".pwstrength_viewport_progress"
}
};
options1.common = {
debug: false,
};
$('.example1').pwstrength(options1);
// Example 2
var options2 = {};
options2.ui = {
container: "#pwd-container2",
showStatus: true,
showProgressBar: false,
viewports: {
verdict: ".pwstrength_viewport_verdict"
}
};
$('.example2').pwstrength(options2);
// Example 3
var options3 = {};
options3.ui = {
container: "#pwd-container3",
showVerdictsInsideProgressBar: true,
viewports: {
progress: ".pwstrength_viewport_progress2"
}
};
options3.common = {
debug: true,
usernameField: "#username"
};
$('.example3').pwstrength(options3);
// Example 4
var options4 = {};
options4.ui = {
container: "#pwd-container4",
viewports: {
progress: ".pwstrength_viewport_progress4",
verdict: ".pwstrength_viewport_verdict4"
}
};
options4.common = {
zxcvbn: true,
zxcvbnTerms: ['samurai', 'shogun', 'bushido', 'daisho', 'seppuku'],
userInputs: ['#year', '#familyname']
};
$('.example4').pwstrength(options4);
})
</script>