m2m_keygen 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e37329faa3536c931f8a622280c9c23f366135729263c749a6965c4a80ed9c4
4
- data.tar.gz: dc593bf4e794ffcd877262f851303c8b4b9f69fbd33befd43fd7a3fb847a59c2
3
+ metadata.gz: 56d8e99449c6686b19454549a0e199627bc09414a79cf055a6add037bf85b70c
4
+ data.tar.gz: 3743203c38f7d58be0c7498567133359430f6ea308e8c3697e62a6ea399cb1eb
5
5
  SHA512:
6
- metadata.gz: a1099d8210b5b866851ea0e80b1c6093231c5d3ce6173a507e2a0982d3113483e395db5148053daa94d3e3e73fa7ddd29f9567f2b670eee88dd36fc24a5ce4f4
7
- data.tar.gz: 10b715091a58bfd03b5cb8b8ccb812c3f35fc747a2e3bdd029624577ac80cfa8468b36d5cf57f9b88464459ea808d65548d9e29e3ffff30b7b5fc07a8eca3afd
6
+ metadata.gz: 83bd8412947616d411dd35d9e3e5a887504be2333e4f4c57c9e1b51599a3c08edd45f7ec898af75199c3c51cb1bdb77d34c84d760ad850474e76d340a9e06371
7
+ data.tar.gz: 862c41dced8752d0f164005380d3497dfbc90cb5c814c003b5643662e327b1820b8628bcddec55fe5f79d8c661b68cac5ba6376d4deaf1e398a5fe53d2a95efd
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.4.0]
11
+
12
+ ### Added
13
+
14
+ - Direct validation for `Rack::Request` like objects.
15
+
10
16
  ## [0.3.0]
11
17
 
12
18
  ### Added
@@ -31,7 +37,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
31
37
 
32
38
  - Basic skeleton for gem
33
39
 
34
- [unreleased]: https://github.com/Billcorporate/m2m_keygen_ruby/compare/v0.3.0...HEAD
40
+ [unreleased]: https://github.com/Billcorporate/m2m_keygen_ruby/compare/v0.4.0...HEAD
41
+ [0.4.0]: https://github.com/Billcorporate/m2m_keygen_ruby/releases/tag/v0.4.0
35
42
  [0.3.0]: https://github.com/Billcorporate/m2m_keygen_ruby/releases/tag/v0.3.0
36
43
  [0.2.1]: https://github.com/Billcorporate/m2m_keygen_ruby/releases/tag/v0.2.1
37
44
  [0.2.0]: https://github.com/Billcorporate/m2m_keygen_ruby/releases/tag/v0.2.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- m2m_keygen (0.3.0)
4
+ m2m_keygen (0.4.0)
5
+ rack
5
6
  sorbet-runtime
6
7
  zeitwerk (~> 2.6)
7
8
 
@@ -91,6 +92,7 @@ GEM
91
92
  byebug (~> 11.0)
92
93
  pry (>= 0.13, < 0.15)
93
94
  racc (1.6.0)
95
+ rack (2.2.4)
94
96
  rainbow (3.1.1)
95
97
  rake (13.0.6)
96
98
  rb-fsevent (0.11.2)
data/README.md CHANGED
@@ -81,6 +81,36 @@ AuthSignature.validate(
81
81
 
82
82
  If the validation is true, the request was signed with the same algorithm and same secret key.
83
83
 
84
+ ### RackValidator
85
+
86
+ This module is here for directly validate Rack requests.
87
+
88
+ It will validate :
89
+
90
+ - Signature matching
91
+ - That the `expiry` parameter is present and between now and in 2 minutes.
92
+
93
+ #### Initialization
94
+
95
+ You should initialize the `RackValidator` once (in an initializer for example) with your secret key, eventually an encryption algorithm and a header name for the signature.
96
+
97
+ ```ruby
98
+ RackSignatureValidator =
99
+ M2mKeygen::RackValidator.new(
100
+ "secret",
101
+ algorithm: "sha512", # Default value
102
+ header_name: "X-Signature" # Default value
103
+ )
104
+ ```
105
+
106
+ #### Validation
107
+
108
+ You can then validate a Rack::Request or a Rails Request directly:
109
+
110
+ ```ruby
111
+ RackSignatureValidator.validate(request) # => true or false
112
+ ```
113
+
84
114
  ## How does it works
85
115
 
86
116
  This is intended for a secure discussion between 2 servers and not something in a browser as the secret key must be stored and used both side (and you don't want to send the secret key in the browser).
@@ -125,7 +125,7 @@
125
125
  </div>
126
126
 
127
127
  <div id="footer">
128
- Generated on Tue Aug 30 11:26:10 2022 by
128
+ Generated on Tue Aug 30 15:18:09 2022 by
129
129
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
130
130
  0.9.28 (ruby-3.1.2).
131
131
  </div>
@@ -311,7 +311,7 @@
311
311
  </div>
312
312
 
313
313
  <div id="footer">
314
- Generated on Tue Aug 30 11:26:10 2022 by
314
+ Generated on Tue Aug 30 15:18:09 2022 by
315
315
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
316
316
  0.9.28 (ruby-3.1.2).
317
317
  </div>
@@ -0,0 +1,531 @@
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: M2mKeygen::RackValidator
8
+
9
+ &mdash; Documentation by YARD 0.9.28
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 = "M2mKeygen::RackValidator";
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 (R)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../M2mKeygen.html" title="M2mKeygen (module)">M2mKeygen</a></span></span>
41
+ &raquo;
42
+ <span class="title">RackValidator</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: M2mKeygen::RackValidator
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">M2mKeygen::RackValidator</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+ <dl>
89
+ <dt>Extended by:</dt>
90
+ <dd>T::Sig</dd>
91
+ </dl>
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/m2m_keygen/rack_validator.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+
108
+
109
+
110
+
111
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
112
+ <ul class="summary">
113
+
114
+ <li class="public ">
115
+ <span class="summary_signature">
116
+
117
+ <a href="#header_name-instance_method" title="#header_name (instance method)">#<strong>header_name</strong> &#x21d2; String </a>
118
+
119
+
120
+
121
+ </span>
122
+
123
+
124
+
125
+
126
+ <span class="note title readonly">readonly</span>
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+ <span class="summary_desc"><div class='inline'></div></span>
137
+
138
+ </li>
139
+
140
+
141
+ <li class="public ">
142
+ <span class="summary_signature">
143
+
144
+ <a href="#signature-instance_method" title="#signature (instance method)">#<strong>signature</strong> &#x21d2; Signature </a>
145
+
146
+
147
+
148
+ </span>
149
+
150
+
151
+
152
+
153
+ <span class="note title readonly">readonly</span>
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'></div></span>
164
+
165
+ </li>
166
+
167
+
168
+ </ul>
169
+
170
+
171
+
172
+
173
+
174
+ <h2>
175
+ Instance Method Summary
176
+ <small><a href="#" class="summary_toggle">collapse</a></small>
177
+ </h2>
178
+
179
+ <ul class="summary">
180
+
181
+ <li class="public ">
182
+ <span class="summary_signature">
183
+
184
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(secret, algorithm: &quot;sha512&quot;, header_name: &quot;X-Signature&quot;) &#x21d2; void </a>
185
+
186
+
187
+
188
+ </span>
189
+
190
+
191
+ <span class="note title constructor">constructor</span>
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'></div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#validate-instance_method" title="#validate (instance method)">#<strong>validate</strong>(req) &#x21d2; Boolean </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'></div></span>
223
+
224
+ </li>
225
+
226
+
227
+ </ul>
228
+
229
+
230
+
231
+ <div id="constructor_details" class="method_details_list">
232
+ <h2>Constructor Details</h2>
233
+
234
+ <div class="method_details first">
235
+ <h3 class="signature first" id="initialize-instance_method">
236
+
237
+ #<strong>initialize</strong>(secret, algorithm: &quot;sha512&quot;, header_name: &quot;X-Signature&quot;) &#x21d2; <tt>void</tt>
238
+
239
+
240
+
241
+
242
+
243
+ </h3><div class="docstring">
244
+ <div class="discussion">
245
+
246
+
247
+ </div>
248
+ </div>
249
+ <div class="tags">
250
+ <p class="tag_title">Parameters:</p>
251
+ <ul class="param">
252
+
253
+ <li>
254
+
255
+ <span class='name'>secret</span>
256
+
257
+
258
+ <span class='type'>(<tt>String</tt>)</span>
259
+
260
+
261
+
262
+ </li>
263
+
264
+ <li>
265
+
266
+ <span class='name'>algorithm</span>
267
+
268
+
269
+ <span class='type'>(<tt>String</tt>)</span>
270
+
271
+
272
+ <em class="default">(defaults to: <tt>&quot;sha512&quot;</tt>)</em>
273
+
274
+
275
+ </li>
276
+
277
+ <li>
278
+
279
+ <span class='name'>header_name</span>
280
+
281
+
282
+ <span class='type'>(<tt>String</tt>)</span>
283
+
284
+
285
+ <em class="default">(defaults to: <tt>&quot;X-Signature&quot;</tt>)</em>
286
+
287
+
288
+ </li>
289
+
290
+ </ul>
291
+
292
+
293
+ </div><table class="source_code">
294
+ <tr>
295
+ <td>
296
+ <pre class="lines">
297
+
298
+
299
+ 16
300
+ 17
301
+ 18
302
+ 19</pre>
303
+ </td>
304
+ <td>
305
+ <pre class="code"><span class="info file"># File 'lib/m2m_keygen/rack_validator.rb', line 16</span>
306
+
307
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_secret'>secret</span><span class='comma'>,</span> <span class='label'>algorithm:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>sha512</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>header_name:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>X-Signature</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
308
+ <span class='ivar'>@header_name</span> <span class='op'>=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HTTP_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_header_name'>header_name</span><span class='period'>.</span><span class='id identifier rubyid_tr'>tr</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='const'>String</span><span class='rparen'>)</span>
309
+ <span class='ivar'>@signature</span> <span class='op'>=</span> <span class='const'>T</span><span class='period'>.</span><span class='id identifier rubyid_let'>let</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Signature.html" title="M2mKeygen::Signature (class)">Signature</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Signature.html#initialize-instance_method" title="M2mKeygen::Signature#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_secret'>secret</span><span class='comma'>,</span> <span class='label'>algorithm:</span> <span class='id identifier rubyid_algorithm'>algorithm</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='const'><span class='object_link'><a href="Signature.html" title="M2mKeygen::Signature (class)">Signature</a></span></span><span class='rparen'>)</span>
310
+ <span class='kw'>end</span></pre>
311
+ </td>
312
+ </tr>
313
+ </table>
314
+ </div>
315
+
316
+ </div>
317
+
318
+ <div id="instance_attr_details" class="attr_details">
319
+ <h2>Instance Attribute Details</h2>
320
+
321
+
322
+ <span id=""></span>
323
+ <div class="method_details first">
324
+ <h3 class="signature first" id="header_name-instance_method">
325
+
326
+ #<strong>header_name</strong> &#x21d2; <tt>String</tt> <span class="extras">(readonly)</span>
327
+
328
+
329
+
330
+
331
+
332
+ </h3><div class="docstring">
333
+ <div class="discussion">
334
+
335
+
336
+ </div>
337
+ </div>
338
+ <div class="tags">
339
+
340
+ <p class="tag_title">Returns:</p>
341
+ <ul class="return">
342
+
343
+ <li>
344
+
345
+
346
+ <span class='type'>(<tt>String</tt>)</span>
347
+
348
+
349
+
350
+ </li>
351
+
352
+ </ul>
353
+
354
+ </div><table class="source_code">
355
+ <tr>
356
+ <td>
357
+ <pre class="lines">
358
+
359
+
360
+ 13
361
+ 14
362
+ 15</pre>
363
+ </td>
364
+ <td>
365
+ <pre class="code"><span class="info file"># File 'lib/m2m_keygen/rack_validator.rb', line 13</span>
366
+
367
+ <span class='kw'>def</span> <span class='id identifier rubyid_header_name'>header_name</span>
368
+ <span class='ivar'>@header_name</span>
369
+ <span class='kw'>end</span></pre>
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ </div>
374
+
375
+
376
+ <span id=""></span>
377
+ <div class="method_details ">
378
+ <h3 class="signature " id="signature-instance_method">
379
+
380
+ #<strong>signature</strong> &#x21d2; <tt><span class='object_link'><a href="Signature.html" title="M2mKeygen::Signature (class)">Signature</a></span></tt> <span class="extras">(readonly)</span>
381
+
382
+
383
+
384
+
385
+
386
+ </h3><div class="docstring">
387
+ <div class="discussion">
388
+
389
+
390
+ </div>
391
+ </div>
392
+ <div class="tags">
393
+
394
+ <p class="tag_title">Returns:</p>
395
+ <ul class="return">
396
+
397
+ <li>
398
+
399
+
400
+ <span class='type'>(<tt><span class='object_link'><a href="Signature.html" title="M2mKeygen::Signature (class)">Signature</a></span></tt>)</span>
401
+
402
+
403
+
404
+ </li>
405
+
406
+ </ul>
407
+
408
+ </div><table class="source_code">
409
+ <tr>
410
+ <td>
411
+ <pre class="lines">
412
+
413
+
414
+ 10
415
+ 11
416
+ 12</pre>
417
+ </td>
418
+ <td>
419
+ <pre class="code"><span class="info file"># File 'lib/m2m_keygen/rack_validator.rb', line 10</span>
420
+
421
+ <span class='kw'>def</span> <span class='id identifier rubyid_signature'>signature</span>
422
+ <span class='ivar'>@signature</span>
423
+ <span class='kw'>end</span></pre>
424
+ </td>
425
+ </tr>
426
+ </table>
427
+ </div>
428
+
429
+ </div>
430
+
431
+
432
+ <div id="instance_method_details" class="method_details_list">
433
+ <h2>Instance Method Details</h2>
434
+
435
+
436
+ <div class="method_details first">
437
+ <h3 class="signature first" id="validate-instance_method">
438
+
439
+ #<strong>validate</strong>(req) &#x21d2; <tt>Boolean</tt>
440
+
441
+
442
+
443
+
444
+
445
+ </h3><div class="docstring">
446
+ <div class="discussion">
447
+
448
+
449
+ </div>
450
+ </div>
451
+ <div class="tags">
452
+ <p class="tag_title">Parameters:</p>
453
+ <ul class="param">
454
+
455
+ <li>
456
+
457
+ <span class='name'>req</span>
458
+
459
+
460
+ <span class='type'>(<tt>Rack::Request</tt>)</span>
461
+
462
+
463
+
464
+ </li>
465
+
466
+ </ul>
467
+
468
+ <p class="tag_title">Returns:</p>
469
+ <ul class="return">
470
+
471
+ <li>
472
+
473
+
474
+ <span class='type'>(<tt>Boolean</tt>)</span>
475
+
476
+
477
+
478
+ </li>
479
+
480
+ </ul>
481
+
482
+ </div><table class="source_code">
483
+ <tr>
484
+ <td>
485
+ <pre class="lines">
486
+
487
+
488
+ 22
489
+ 23
490
+ 24
491
+ 25
492
+ 26
493
+ 27
494
+ 28
495
+ 29
496
+ 30
497
+ 31
498
+ 32</pre>
499
+ </td>
500
+ <td>
501
+ <pre class="code"><span class="info file"># File 'lib/m2m_keygen/rack_validator.rb', line 22</span>
502
+
503
+ <span class='kw'>def</span> <span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='id identifier rubyid_req'>req</span><span class='rparen'>)</span>
504
+ <span class='comment'># This will cover the case when Rails is used.
505
+ </span> <span class='id identifier rubyid_req'>req</span> <span class='op'>=</span> <span class='const'>Rack</span><span class='op'>::</span><span class='const'>Request</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='rparen'>)</span>
506
+ <span class='ivar'>@signature</span><span class='period'>.</span><span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span>
507
+ <span class='label'>params:</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='comma'>,</span>
508
+ <span class='label'>verb:</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_request_method'>request_method</span><span class='comma'>,</span>
509
+ <span class='label'>path:</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span>
510
+ <span class='label'>signature:</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HTTP_X_SIGNATURE</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
511
+ <span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>expiry</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>expiry</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>&gt;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>&amp;&amp;</span>
512
+ <span class='id identifier rubyid_req'>req</span><span class='period'>.</span><span class='id identifier rubyid_params'>params</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>expiry</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>&lt;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>+</span> <span class='int'>120</span>
513
+ <span class='kw'>end</span></pre>
514
+ </td>
515
+ </tr>
516
+ </table>
517
+ </div>
518
+
519
+ </div>
520
+
521
+ </div>
522
+
523
+ <div id="footer">
524
+ Generated on Tue Aug 30 15:18:09 2022 by
525
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
526
+ 0.9.28 (ruby-3.1.2).
527
+ </div>
528
+
529
+ </div>
530
+ </body>
531
+ </html>
@@ -646,7 +646,7 @@
646
646
  <pre class="code"><span class="info file"># File 'lib/m2m_keygen/signature.rb', line 46</span>
647
647
 
648
648
  <span class='kw'>def</span> <span class='id identifier rubyid_validate'>validate</span><span class='lparen'>(</span><span class='label'>params:</span><span class='comma'>,</span> <span class='label'>verb:</span><span class='comma'>,</span> <span class='label'>path:</span><span class='comma'>,</span> <span class='label'>signature:</span><span class='rparen'>)</span>
649
- <span class='kw'>if</span> <span class='const'>OpenSSL</span><span class='period'>.</span><span class='id identifier rubyid_method_defined?'>method_defined?</span><span class='lparen'>(</span><span class='symbol'>:fixed_length_secure_compare</span><span class='rparen'>)</span>
649
+ <span class='kw'>if</span> <span class='const'>OpenSSL</span><span class='period'>.</span><span class='id identifier rubyid_methods'>methods</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='symbol'>:fixed_length_secure_compare</span><span class='rparen'>)</span>
650
650
  <span class='const'>OpenSSL</span><span class='period'>.</span><span class='id identifier rubyid_fixed_length_secure_compare'>fixed_length_secure_compare</span><span class='lparen'>(</span>
651
651
  <span class='id identifier rubyid_sign'>sign</span><span class='lparen'>(</span><span class='label'>params:</span> <span class='id identifier rubyid_params'>params</span><span class='comma'>,</span> <span class='label'>verb:</span> <span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span><span class='comma'>,</span>
652
652
  <span class='id identifier rubyid_signature'>signature</span>
@@ -670,7 +670,7 @@
670
670
  </div>
671
671
 
672
672
  <div id="footer">
673
- Generated on Tue Aug 30 11:26:10 2022 by
673
+ Generated on Tue Aug 30 15:18:09 2022 by
674
674
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
675
675
  0.9.28 (ruby-3.1.2).
676
676
  </div>
@@ -137,7 +137,7 @@
137
137
  </div>
138
138
 
139
139
  <div id="footer">
140
- Generated on Tue Aug 30 11:26:10 2022 by
140
+ Generated on Tue Aug 30 15:18:09 2022 by
141
141
  <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
142
142
  0.9.28 (ruby-3.1.2).
143
143
  </div>