dh_easy-login 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,117 @@
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
+ Module: DhEasy::Login::Plugin
8
+
9
+ &mdash; Documentation by YARD 0.9.20
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "DhEasy::Login::Plugin";
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 (P)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Login.html" title="DhEasy::Login (module)">Login</a></span></span>
41
+ &raquo;
42
+ <span class="title">Plugin</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>Module: DhEasy::Login::Plugin
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ <dl>
80
+ <dt>Defined in:</dt>
81
+ <dd>lib/dh_easy/login/plugin.rb<span class="defines">,<br />
82
+ lib/dh_easy/login/plugin/enabled_behavior.rb</span>
83
+ </dd>
84
+ </dl>
85
+
86
+ </div>
87
+
88
+ <h2>Defined Under Namespace</h2>
89
+ <p class="children">
90
+
91
+
92
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Plugin/EnabledBehavior.html" title="DhEasy::Login::Plugin::EnabledBehavior (module)">EnabledBehavior</a></span>
93
+
94
+
95
+
96
+
97
+ </p>
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </div>
108
+
109
+ <div id="footer">
110
+ Generated on Wed Dec 4 23:19:59 2019 by
111
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
112
+ 0.9.20 (ruby-2.5.3).
113
+ </div>
114
+
115
+ </div>
116
+ </body>
117
+ </html>
@@ -0,0 +1,590 @@
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
+ Module: DhEasy::Login::Plugin::EnabledBehavior
8
+
9
+ &mdash; Documentation by YARD 0.9.20
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ pathId = "DhEasy::Login::Plugin::EnabledBehavior";
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 (E)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../../Login.html" title="DhEasy::Login (module)">Login</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Plugin.html" title="DhEasy::Login::Plugin (module)">Plugin</a></span></span>
41
+ &raquo;
42
+ <span class="title">EnabledBehavior</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>Module: DhEasy::Login::Plugin::EnabledBehavior
63
+ <span class="abstract note title">Abstract</span>
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dl>
75
+ <dt>Includes:</dt>
76
+ <dd>Core::Plugin::InitializeHook</dd>
77
+ </dl>
78
+
79
+
80
+
81
+
82
+
83
+
84
+ <dl>
85
+ <dt>Defined in:</dt>
86
+ <dd>lib/dh_easy/login/plugin/enabled_behavior.rb</dd>
87
+ </dl>
88
+
89
+ </div>
90
+
91
+ <h2>Overview</h2><div class="docstring">
92
+ <div class="discussion">
93
+ <div class="note abstract">
94
+ <strong>This module is abstract.</strong>
95
+ <div class='inline'></div>
96
+ </div>
97
+
98
+ <p>Abstract module that provides a template with minimal common logic to</p>
99
+
100
+ <pre class="code ruby"><code class="ruby">implement a login flow enabled plugin.
101
+ </code></pre>
102
+
103
+
104
+ </div>
105
+ </div>
106
+ <div class="tags">
107
+
108
+
109
+ </div>
110
+
111
+
112
+
113
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
114
+ <ul class="summary">
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#login_flow-instance_method" title="#login_flow (instance method)">#<strong>login_flow</strong> &#x21d2; Object </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+ <span class="note title readonly">readonly</span>
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'>
139
+ <p>Login flow tool.</p>
140
+ </div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+
148
+
149
+
150
+
151
+ <h2>
152
+ Instance Method Summary
153
+ <small><a href="#" class="summary_toggle">collapse</a></small>
154
+ </h2>
155
+
156
+ <ul class="summary">
157
+
158
+ <li class="public ">
159
+ <span class="summary_signature">
160
+
161
+ <a href="#fix_session-instance_method" title="#fix_session (instance method)">#<strong>fix_session</strong> &#x21d2; Boolean </a>
162
+
163
+
164
+
165
+ </span>
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <span class="summary_desc"><div class='inline'>
176
+ <p>Fixes current page&#39;s session.</p>
177
+ </div></span>
178
+
179
+ </li>
180
+
181
+
182
+ <li class="public ">
183
+ <span class="summary_signature">
184
+
185
+ <a href="#initialize_hook_login_plugin_enabled_behavior-instance_method" title="#initialize_hook_login_plugin_enabled_behavior (instance method)">#<strong>initialize_hook_login_plugin_enabled_behavior</strong>(opts = {}) &#x21d2; Object </a>
186
+
187
+
188
+
189
+ </span>
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+ <span class="summary_desc"><div class='inline'>
200
+ <p>Hook to initialize login_flow configuration.</p>
201
+ </div></span>
202
+
203
+ </li>
204
+
205
+
206
+ <li class="public ">
207
+ <span class="summary_signature">
208
+
209
+ <a href="#salt-instance_method" title="#salt (instance method)">#<strong>salt</strong> &#x21d2; String </a>
210
+
211
+
212
+
213
+ </span>
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+
223
+ <span class="summary_desc"><div class='inline'>
224
+ <p>Generates a salt value based on the current page&#39;s login flow vars.</p>
225
+ </div></span>
226
+
227
+ </li>
228
+
229
+
230
+ <li class="public ">
231
+ <span class="summary_signature">
232
+
233
+ <a href="#valid_session%3F-instance_method" title="#valid_session? (instance method)">#<strong>valid_session?</strong> &#x21d2; Boolean </a>
234
+
235
+
236
+
237
+ </span>
238
+
239
+
240
+
241
+
242
+
243
+
244
+
245
+
246
+
247
+ <span class="summary_desc"><div class='inline'>
248
+ <p>Validates that the current page&#39;s session hasn&#39;t expired.</p>
249
+ </div></span>
250
+
251
+ </li>
252
+
253
+
254
+ </ul>
255
+
256
+
257
+
258
+
259
+ <div id="instance_attr_details" class="attr_details">
260
+ <h2>Instance Attribute Details</h2>
261
+
262
+
263
+ <span id=""></span>
264
+ <div class="method_details first">
265
+ <h3 class="signature first" id="login_flow-instance_method">
266
+
267
+ #<strong>login_flow</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
268
+
269
+
270
+
271
+
272
+
273
+ </h3><div class="docstring">
274
+ <div class="discussion">
275
+
276
+ <p>Login flow tool.</p>
277
+
278
+
279
+ </div>
280
+ </div>
281
+ <div class="tags">
282
+
283
+
284
+ </div><table class="source_code">
285
+ <tr>
286
+ <td>
287
+ <pre class="lines">
288
+
289
+
290
+ 11
291
+ 12
292
+ 13</pre>
293
+ </td>
294
+ <td>
295
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/login/plugin/enabled_behavior.rb', line 11</span>
296
+
297
+ <span class='kw'>def</span> <span class='id identifier rubyid_login_flow'>login_flow</span>
298
+ <span class='ivar'>@login_flow</span>
299
+ <span class='kw'>end</span></pre>
300
+ </td>
301
+ </tr>
302
+ </table>
303
+ </div>
304
+
305
+ </div>
306
+
307
+
308
+ <div id="instance_method_details" class="method_details_list">
309
+ <h2>Instance Method Details</h2>
310
+
311
+
312
+ <div class="method_details first">
313
+ <h3 class="signature first" id="fix_session-instance_method">
314
+
315
+ #<strong>fix_session</strong> &#x21d2; <tt>Boolean</tt>
316
+
317
+
318
+
319
+
320
+
321
+ </h3><div class="docstring">
322
+ <div class="discussion">
323
+
324
+ <p>Fixes current page&#39;s session.</p>
325
+
326
+
327
+ </div>
328
+ </div>
329
+ <div class="tags">
330
+
331
+ <p class="tag_title">Returns:</p>
332
+ <ul class="return">
333
+
334
+ <li>
335
+
336
+
337
+ <span class='type'>(<tt>Boolean</tt>)</span>
338
+
339
+
340
+
341
+ &mdash;
342
+ <div class='inline'>
343
+ <p>`true` when session is valid and no need to fix, else `false`.</p>
344
+ </div>
345
+
346
+ </li>
347
+
348
+ </ul>
349
+ <p class="tag_title">Raises:</p>
350
+ <ul class="raise">
351
+
352
+ <li>
353
+
354
+
355
+ <span class='type'>(<tt>NotImplementedError</tt>)</span>
356
+
357
+
358
+
359
+ </li>
360
+
361
+ </ul>
362
+
363
+ </div><table class="source_code">
364
+ <tr>
365
+ <td>
366
+ <pre class="lines">
367
+
368
+
369
+ 41
370
+ 42
371
+ 43</pre>
372
+ </td>
373
+ <td>
374
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/login/plugin/enabled_behavior.rb', line 41</span>
375
+
376
+ <span class='kw'>def</span> <span class='id identifier rubyid_fix_session'>fix_session</span>
377
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Must implement &quot;fix_session&quot; function.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
378
+ <span class='kw'>end</span></pre>
379
+ </td>
380
+ </tr>
381
+ </table>
382
+ </div>
383
+
384
+ <div class="method_details ">
385
+ <h3 class="signature " id="initialize_hook_login_plugin_enabled_behavior-instance_method">
386
+
387
+ #<strong>initialize_hook_login_plugin_enabled_behavior</strong>(opts = {}) &#x21d2; <tt>Object</tt>
388
+
389
+
390
+
391
+
392
+
393
+ </h3><div class="docstring">
394
+ <div class="discussion">
395
+
396
+ <p>Hook to initialize login_flow configuration.</p>
397
+
398
+
399
+ </div>
400
+ </div>
401
+ <div class="tags">
402
+ <p class="tag_title">Parameters:</p>
403
+ <ul class="param">
404
+
405
+ <li>
406
+
407
+ <span class='name'>opts</span>
408
+
409
+
410
+ <span class='type'>(<tt>Hash</tt>)</span>
411
+
412
+
413
+ <em class="default">(defaults to: <tt>{}</tt>)</em>
414
+
415
+
416
+ &mdash;
417
+ <div class='inline'>
418
+ <p>({}) Configuration options (see
419
+ DhEasy::Login::Flow#initialize_hook_login_flow).</p>
420
+ </div>
421
+
422
+ </li>
423
+
424
+ </ul>
425
+
426
+
427
+ </div><table class="source_code">
428
+ <tr>
429
+ <td>
430
+ <pre class="lines">
431
+
432
+
433
+ 17
434
+ 18
435
+ 19</pre>
436
+ </td>
437
+ <td>
438
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/login/plugin/enabled_behavior.rb', line 17</span>
439
+
440
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize_hook_login_plugin_enabled_behavior'>initialize_hook_login_plugin_enabled_behavior</span> <span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
441
+ <span class='ivar'>@login_flow</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../../DhEasy.html" title="DhEasy (module)">DhEasy</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../../Login.html" title="DhEasy::Login (module)">Login</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../Flow.html" title="DhEasy::Login::Flow (class)">Flow</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='id identifier rubyid_opts'>opts</span>
442
+ <span class='kw'>end</span></pre>
443
+ </td>
444
+ </tr>
445
+ </table>
446
+ </div>
447
+
448
+ <div class="method_details ">
449
+ <h3 class="signature " id="salt-instance_method">
450
+
451
+ #<strong>salt</strong> &#x21d2; <tt>String</tt>
452
+
453
+
454
+
455
+
456
+
457
+ </h3><div class="docstring">
458
+ <div class="discussion">
459
+
460
+ <p>Generates a salt value based on the current page&#39;s login flow vars.</p>
461
+
462
+
463
+ </div>
464
+ </div>
465
+ <div class="tags">
466
+
467
+ <p class="tag_title">Returns:</p>
468
+ <ul class="return">
469
+
470
+ <li>
471
+
472
+
473
+ <span class='type'>(<tt>String</tt>)</span>
474
+
475
+
476
+
477
+ </li>
478
+
479
+ </ul>
480
+
481
+ </div><table class="source_code">
482
+ <tr>
483
+ <td>
484
+ <pre class="lines">
485
+
486
+
487
+ 24
488
+ 25
489
+ 26
490
+ 27
491
+ 28</pre>
492
+ </td>
493
+ <td>
494
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/login/plugin/enabled_behavior.rb', line 24</span>
495
+
496
+ <span class='kw'>def</span> <span class='id identifier rubyid_salt'>salt</span>
497
+ <span class='id identifier rubyid_old_cookie'>old_cookie</span> <span class='op'>=</span> <span class='id identifier rubyid_page'>page</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>vars</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='id identifier rubyid_login_flow'>login_flow</span><span class='period'>.</span><span class='id identifier rubyid_vars_key'>vars_key</span><span class='rbracket'>]</span>
498
+ <span class='id identifier rubyid_old_cookie'>old_cookie</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_end'>&#39;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_old_cookie'>old_cookie</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
499
+ <span class='const'>Digest</span><span class='op'>::</span><span class='const'>SHA1</span><span class='period'>.</span><span class='id identifier rubyid_hexdigest'>hexdigest</span> <span class='id identifier rubyid_old_cookie'>old_cookie</span>
500
+ <span class='kw'>end</span></pre>
501
+ </td>
502
+ </tr>
503
+ </table>
504
+ </div>
505
+
506
+ <div class="method_details ">
507
+ <h3 class="signature " id="valid_session?-instance_method">
508
+
509
+ #<strong>valid_session?</strong> &#x21d2; <tt>Boolean</tt>
510
+
511
+
512
+
513
+
514
+
515
+ </h3><div class="docstring">
516
+ <div class="discussion">
517
+
518
+ <p>Validates that the current page&#39;s session hasn&#39;t expired.</p>
519
+
520
+
521
+ </div>
522
+ </div>
523
+ <div class="tags">
524
+
525
+ <p class="tag_title">Returns:</p>
526
+ <ul class="return">
527
+
528
+ <li>
529
+
530
+
531
+ <span class='type'>(<tt>Boolean</tt>)</span>
532
+
533
+
534
+
535
+ &mdash;
536
+ <div class='inline'>
537
+ <p>`true` when session is valid, else `false`.</p>
538
+ </div>
539
+
540
+ </li>
541
+
542
+ </ul>
543
+ <p class="tag_title">Raises:</p>
544
+ <ul class="raise">
545
+
546
+ <li>
547
+
548
+
549
+ <span class='type'>(<tt>NotImplementedError</tt>)</span>
550
+
551
+
552
+
553
+ </li>
554
+
555
+ </ul>
556
+
557
+ </div><table class="source_code">
558
+ <tr>
559
+ <td>
560
+ <pre class="lines">
561
+
562
+
563
+ 33
564
+ 34
565
+ 35</pre>
566
+ </td>
567
+ <td>
568
+ <pre class="code"><span class="info file"># File 'lib/dh_easy/login/plugin/enabled_behavior.rb', line 33</span>
569
+
570
+ <span class='kw'>def</span> <span class='id identifier rubyid_valid_session?'>valid_session?</span>
571
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Must implement &quot;session_valid?&quot; function.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
572
+ <span class='kw'>end</span></pre>
573
+ </td>
574
+ </tr>
575
+ </table>
576
+ </div>
577
+
578
+ </div>
579
+
580
+ </div>
581
+
582
+ <div id="footer">
583
+ Generated on Wed Dec 4 23:19:59 2019 by
584
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
585
+ 0.9.20 (ruby-2.5.3).
586
+ </div>
587
+
588
+ </div>
589
+ </body>
590
+ </html>