orthodox 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,476 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: TfaSession
8
+
9
+ &mdash; Orthodox
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "TfaSession";
19
+ relpath = '';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="_index.html">Index (T)</a> &raquo;
40
+
41
+
42
+ <span class="title">TfaSession</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: TfaSession
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName">Object</span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next">TfaSession</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd>ActiveModel::Attributes, ActiveModel::Model</dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/generators/authentication/templates/models/tfa_session.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+ <p>Form object for handling two-factor authentication sessions</p>
110
+
111
+ <p>Automatically generated by the orthodox gem (<a href="https://github.com/katanacode/orthodox">https://github.com/katanacode/orthodox</a>)
112
+ (c) Copyright 2019 Katana Code Ltd. All Rights Reserved.</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+
120
+ </div>
121
+
122
+ <h2>
123
+ Constant Summary
124
+ <small><a href="#" class="constants_summary_toggle">collapse</a></small>
125
+ </h2>
126
+
127
+ <dl class="constants">
128
+
129
+ <dt id="OTP_FORMAT-constant" class="">OTP_FORMAT =
130
+ <div class="docstring">
131
+ <div class="discussion">
132
+ <p>Regex for OTP format</p>
133
+
134
+
135
+ </div>
136
+ </div>
137
+ <div class="tags">
138
+
139
+
140
+ </div>
141
+ </dt>
142
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A\d{3,5}\Z|</span><span class='regexp_end'>/</span></span></pre></dd>
143
+
144
+ <dt id="RECOVERY_CODE_FORMAT-constant" class="">RECOVERY_CODE_FORMAT =
145
+ <div class="docstring">
146
+ <div class="discussion">
147
+ <p>Regex for recovery code format</p>
148
+
149
+
150
+ </div>
151
+ </div>
152
+ <div class="tags">
153
+
154
+
155
+ </div>
156
+ </dt>
157
+ <dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\A\w{5}\-\w{5}\Z</span><span class='regexp_end'>/</span></span></pre></dd>
158
+
159
+ </dl>
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+ <h2>
170
+ Instance Method Summary
171
+ <small><a href="#" class="summary_toggle">collapse</a></small>
172
+ </h2>
173
+
174
+ <ul class="summary">
175
+
176
+ <li class="public ">
177
+ <span class="summary_signature">
178
+
179
+ <a href="#otp%3F-instance_method" title="#otp? (instance method)">#<strong>otp?</strong> &#x21d2; Boolean </a>
180
+
181
+
182
+
183
+ </span>
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
193
+ <span class="summary_desc"><div class='inline'><p>=========================== = Public instance methods = ===========================.</p>
194
+ </div></span>
195
+
196
+ </li>
197
+
198
+
199
+ <li class="private ">
200
+ <span class="summary_signature">
201
+
202
+ <a href="#otp_correct-instance_method" title="#otp_correct (instance method)">#<strong>otp_correct</strong> &#x21d2; Object </a>
203
+
204
+
205
+
206
+ </span>
207
+
208
+
209
+
210
+ <span class="note title private">private</span>
211
+
212
+
213
+
214
+
215
+
216
+ <span class="summary_desc"><div class='inline'><p>============================ = Private instance methods = ============================.</p>
217
+ </div></span>
218
+
219
+ </li>
220
+
221
+
222
+ <li class="public ">
223
+ <span class="summary_signature">
224
+
225
+ <a href="#recovery_code%3F-instance_method" title="#recovery_code? (instance method)">#<strong>recovery_code?</strong> &#x21d2; Boolean </a>
226
+
227
+
228
+
229
+ </span>
230
+
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+ <span class="summary_desc"><div class='inline'></div></span>
240
+
241
+ </li>
242
+
243
+
244
+ <li class="private ">
245
+ <span class="summary_signature">
246
+
247
+ <a href="#recovery_code_correct-instance_method" title="#recovery_code_correct (instance method)">#<strong>recovery_code_correct</strong> &#x21d2; Object </a>
248
+
249
+
250
+
251
+ </span>
252
+
253
+
254
+
255
+ <span class="note title private">private</span>
256
+
257
+
258
+
259
+
260
+
261
+ <span class="summary_desc"><div class='inline'></div></span>
262
+
263
+ </li>
264
+
265
+
266
+ </ul>
267
+
268
+
269
+
270
+
271
+
272
+
273
+ <div id="instance_method_details" class="method_details_list">
274
+ <h2>Instance Method Details</h2>
275
+
276
+
277
+ <div class="method_details first">
278
+ <h3 class="signature first" id="otp?-instance_method">
279
+
280
+ #<strong>otp?</strong> &#x21d2; <tt>Boolean</tt>
281
+
282
+
283
+
284
+
285
+
286
+ </h3><div class="docstring">
287
+ <div class="discussion">
288
+ <p>===========================</p>
289
+
290
+ <h1>= Public instance methods =</h1>
291
+
292
+
293
+ </div>
294
+ </div>
295
+ <div class="tags">
296
+
297
+ <p class="tag_title">Returns:</p>
298
+ <ul class="return">
299
+
300
+ <li>
301
+
302
+
303
+ <span class='type'>(<tt>Boolean</tt>)</span>
304
+
305
+
306
+
307
+ </li>
308
+
309
+ </ul>
310
+
311
+ </div><table class="source_code">
312
+ <tr>
313
+ <td>
314
+ <pre class="lines">
315
+
316
+
317
+ 51
318
+ 52
319
+ 53</pre>
320
+ </td>
321
+ <td>
322
+ <pre class="code"><span class="info file"># File 'lib/generators/authentication/templates/models/tfa_session.rb', line 51</span>
323
+
324
+ <span class='kw'>def</span> <span class='id identifier rubyid_otp?'>otp?</span>
325
+ <span class='id identifier rubyid_otp'>otp</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
326
+ <span class='kw'>end</span></pre>
327
+ </td>
328
+ </tr>
329
+ </table>
330
+ </div>
331
+
332
+ <div class="method_details ">
333
+ <h3 class="signature " id="otp_correct-instance_method">
334
+
335
+ #<strong>otp_correct</strong> &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
336
+
337
+
338
+
339
+
340
+
341
+ </h3><div class="docstring">
342
+ <div class="discussion">
343
+ <p>============================</p>
344
+
345
+ <h1>= Private instance methods =</h1>
346
+
347
+
348
+ </div>
349
+ </div>
350
+ <div class="tags">
351
+
352
+
353
+ </div><table class="source_code">
354
+ <tr>
355
+ <td>
356
+ <pre class="lines">
357
+
358
+
359
+ 65
360
+ 66
361
+ 67
362
+ 68
363
+ 69</pre>
364
+ </td>
365
+ <td>
366
+ <pre class="code"><span class="info file"># File 'lib/generators/authentication/templates/models/tfa_session.rb', line 65</span>
367
+
368
+ <span class='kw'>def</span> <span class='id identifier rubyid_otp_correct'>otp_correct</span>
369
+ <span class='kw'>unless</span> <span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_valid_otp?'>valid_otp?</span><span class='lparen'>(</span><span class='id identifier rubyid_otp'>otp</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
370
+ <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='symbol'>:base</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>OTP code was not correct</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
371
+ <span class='kw'>end</span>
372
+ <span class='kw'>end</span></pre>
373
+ </td>
374
+ </tr>
375
+ </table>
376
+ </div>
377
+
378
+ <div class="method_details ">
379
+ <h3 class="signature " id="recovery_code?-instance_method">
380
+
381
+ #<strong>recovery_code?</strong> &#x21d2; <tt>Boolean</tt>
382
+
383
+
384
+
385
+
386
+
387
+ </h3><div class="docstring">
388
+ <div class="discussion">
389
+
390
+
391
+ </div>
392
+ </div>
393
+ <div class="tags">
394
+
395
+ <p class="tag_title">Returns:</p>
396
+ <ul class="return">
397
+
398
+ <li>
399
+
400
+
401
+ <span class='type'>(<tt>Boolean</tt>)</span>
402
+
403
+
404
+
405
+ </li>
406
+
407
+ </ul>
408
+
409
+ </div><table class="source_code">
410
+ <tr>
411
+ <td>
412
+ <pre class="lines">
413
+
414
+
415
+ 55
416
+ 56
417
+ 57</pre>
418
+ </td>
419
+ <td>
420
+ <pre class="code"><span class="info file"># File 'lib/generators/authentication/templates/models/tfa_session.rb', line 55</span>
421
+
422
+ <span class='kw'>def</span> <span class='id identifier rubyid_recovery_code?'>recovery_code?</span>
423
+ <span class='id identifier rubyid_recovery_code'>recovery_code</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
424
+ <span class='kw'>end</span></pre>
425
+ </td>
426
+ </tr>
427
+ </table>
428
+ </div>
429
+
430
+ <div class="method_details ">
431
+ <h3 class="signature " id="recovery_code_correct-instance_method">
432
+
433
+ #<strong>recovery_code_correct</strong> &#x21d2; <tt>Object</tt> <span class="extras">(private)</span>
434
+
435
+
436
+
437
+
438
+
439
+ </h3><table class="source_code">
440
+ <tr>
441
+ <td>
442
+ <pre class="lines">
443
+
444
+
445
+ 71
446
+ 72
447
+ 73
448
+ 74
449
+ 75</pre>
450
+ </td>
451
+ <td>
452
+ <pre class="code"><span class="info file"># File 'lib/generators/authentication/templates/models/tfa_session.rb', line 71</span>
453
+
454
+ <span class='kw'>def</span> <span class='id identifier rubyid_recovery_code_correct'>recovery_code_correct</span>
455
+ <span class='kw'>unless</span> <span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_valid_recovery_code?'>valid_recovery_code?</span><span class='lparen'>(</span><span class='id identifier rubyid_recovery_code'>recovery_code</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
456
+ <span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span><span class='lparen'>(</span><span class='symbol'>:base</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Recovery code was not correct</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
457
+ <span class='kw'>end</span>
458
+ <span class='kw'>end</span></pre>
459
+ </td>
460
+ </tr>
461
+ </table>
462
+ </div>
463
+
464
+ </div>
465
+
466
+ </div>
467
+
468
+ <div id="footer">
469
+ Generated on Thu Aug 13 16:36:42 2020 by
470
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
471
+ 0.9.24 (ruby-2.6.6).
472
+ </div>
473
+
474
+ </div>
475
+ </body>
476
+ </html>