vigiles 0.1.0.pre.beta2 → 0.1.0.pre.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/lib/vigiles/archive/extras.rb +4 -3
  4. data/lib/vigiles/archive/metadata.rb +3 -2
  5. data/lib/vigiles/archive/request.rb +18 -4
  6. data/lib/vigiles/archive.rb +15 -3
  7. data/lib/vigiles/constants.rb +7 -0
  8. data/lib/vigiles/middleware/record_conversation.rb +6 -21
  9. data/lib/vigiles/spec.rb +1 -1
  10. data/lib/vigiles/utilities/uri.rb +18 -0
  11. data/lib/vigiles/version.rb +1 -1
  12. data/lib/vigiles.rb +4 -1
  13. data/sorbet/rbi/gems/{activemodel@7.0.5.rbi → actioncable@7.1.3.3.rbi} +2 -2
  14. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +8 -0
  15. data/sorbet/rbi/gems/{activerecord@7.0.5.rbi → actionmailer@7.1.3.3.rbi} +2 -2
  16. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +20046 -0
  17. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +8 -0
  18. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +15953 -0
  19. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +8 -0
  20. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +6657 -0
  21. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +41520 -0
  22. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +8 -0
  23. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +20570 -0
  24. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  25. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +77 -0
  26. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  27. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  28. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  29. data/sorbet/rbi/gems/date@3.3.4.rbi +74 -0
  30. data/sorbet/rbi/gems/drb@2.2.1.rbi +1346 -0
  31. data/sorbet/rbi/gems/globalid@1.2.1.rbi +8 -0
  32. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2358 -0
  33. data/sorbet/rbi/gems/io-console@0.7.2.rbi +8 -0
  34. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1080 -0
  35. data/sorbet/rbi/gems/{i18n@1.14.1.rbi → mail@2.8.1.rbi} +2 -2
  36. data/sorbet/rbi/gems/marcel@1.0.4.rbi +8 -0
  37. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +8 -0
  38. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  39. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +8 -0
  40. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +8 -0
  41. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +291 -0
  42. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +8 -0
  43. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +8 -0
  44. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +7310 -0
  45. data/sorbet/rbi/gems/psych@5.1.2.rbi +1768 -0
  46. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +729 -0
  47. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +749 -0
  48. data/sorbet/rbi/gems/rack@3.0.11.rbi +5195 -0
  49. data/sorbet/rbi/gems/rackup@2.1.0.rbi +406 -0
  50. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +691 -0
  51. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +721 -0
  52. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +8 -0
  53. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +2167 -0
  54. data/sorbet/rbi/gems/rdoc@6.6.3.1.rbi +12715 -0
  55. data/sorbet/rbi/gems/reline@0.5.7.rbi +8 -0
  56. data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
  57. data/sorbet/rbi/gems/timeout@0.4.1.rbi +148 -0
  58. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2606 -0
  59. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +8 -0
  60. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +8 -0
  61. data/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +1003 -0
  62. data/vigiles.gemspec +1 -1
  63. metadata +54 -7
  64. data/sorbet/rbi/gems/activesupport@7.0.5.rbi +0 -14
@@ -0,0 +1,729 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rack-session` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rack-session`.
6
+
7
+ # source://rack-session//lib/rack/session/constants.rb#7
8
+ module Rack
9
+ class << self
10
+ # source://rack/3.0.11/lib/rack/version.rb#31
11
+ def release; end
12
+
13
+ # source://rack/3.0.11/lib/rack/version.rb#23
14
+ def version; end
15
+ end
16
+ end
17
+
18
+ # source://rack-session//lib/rack/session/constants.rb#8
19
+ module Rack::Session; end
20
+
21
+ # source://rack-session//lib/rack/session/abstract/id.rb#47
22
+ module Rack::Session::Abstract; end
23
+
24
+ # source://rack-session//lib/rack/session/abstract/id.rb#497
25
+ class Rack::Session::Abstract::ID < ::Rack::Session::Abstract::Persisted
26
+ # All thread safety and session destroy procedures should occur here.
27
+ # Should return a new session id or nil if options[:drop]
28
+ #
29
+ # source://rack-session//lib/rack/session/abstract/id.rb#527
30
+ def delete_session(req, sid, options); end
31
+
32
+ # All thread safety and session retrieval procedures should occur here.
33
+ # Should return [session_id, session].
34
+ # If nil is provided as the session id, generation of a new valid id
35
+ # should occur within.
36
+ #
37
+ # source://rack-session//lib/rack/session/abstract/id.rb#512
38
+ def find_session(req, sid); end
39
+
40
+ # All thread safety and session storage procedures should occur here.
41
+ # Must return the session id if the session was saved successfully, or
42
+ # false if the session could not be saved.
43
+ #
44
+ # source://rack-session//lib/rack/session/abstract/id.rb#520
45
+ def write_session(req, sid, session, options); end
46
+
47
+ class << self
48
+ # @private
49
+ #
50
+ # source://rack-session//lib/rack/session/abstract/id.rb#498
51
+ def inherited(klass); end
52
+ end
53
+ end
54
+
55
+ # ID sets up a basic framework for implementing an id based sessioning
56
+ # service. Cookies sent to the client for maintaining sessions will only
57
+ # contain an id reference. Only #find_session, #write_session and
58
+ # #delete_session are required to be overwritten.
59
+ #
60
+ # All parameters are optional.
61
+ # * :key determines the name of the cookie, by default it is
62
+ # 'rack.session'
63
+ # * :path, :domain, :expire_after, :secure, :httponly, and :same_site set
64
+ # the related cookie options as by Rack::Response#set_cookie
65
+ # * :skip will not a set a cookie in the response nor update the session state
66
+ # * :defer will not set a cookie in the response but still update the session
67
+ # state if it is used with a backend
68
+ # * :renew (implementation dependent) will prompt the generation of a new
69
+ # session id, and migration of data to be referenced at the new id. If
70
+ # :defer is set, it will be overridden and the cookie will be set.
71
+ # * :sidbits sets the number of bits in length that a generated session
72
+ # id will be.
73
+ #
74
+ # These options can be set on a per request basis, at the location of
75
+ # <tt>env['rack.session.options']</tt>. Additionally the id of the
76
+ # session can be found within the options hash at the key :id. It is
77
+ # highly not recommended to change its value.
78
+ #
79
+ # Is Rack::Utils::Context compatible.
80
+ #
81
+ # Not included by default; you must require 'rack/session/abstract/id'
82
+ # to use.
83
+ #
84
+ # source://rack-session//lib/rack/session/abstract/id.rb#239
85
+ class Rack::Session::Abstract::Persisted
86
+ # @return [Persisted] a new instance of Persisted
87
+ #
88
+ # source://rack-session//lib/rack/session/abstract/id.rb#256
89
+ def initialize(app, options = T.unsafe(nil)); end
90
+
91
+ # source://rack-session//lib/rack/session/abstract/id.rb#265
92
+ def call(env); end
93
+
94
+ # Acquires the session from the environment and the session id from
95
+ # the session options and passes them to #write_session. If successful
96
+ # and the :defer option is not true, a cookie will be added to the
97
+ # response with the session's id.
98
+ #
99
+ # source://rack-session//lib/rack/session/abstract/id.rb#379
100
+ def commit_session(req, res); end
101
+
102
+ # source://rack-session//lib/rack/session/abstract/id.rb#269
103
+ def context(env, app = T.unsafe(nil)); end
104
+
105
+ # Returns the value of attribute default_options.
106
+ #
107
+ # source://rack-session//lib/rack/session/abstract/id.rb#254
108
+ def default_options; end
109
+
110
+ # Returns the value of attribute key.
111
+ #
112
+ # source://rack-session//lib/rack/session/abstract/id.rb#254
113
+ def key; end
114
+
115
+ # Returns the value of attribute same_site.
116
+ #
117
+ # source://rack-session//lib/rack/session/abstract/id.rb#254
118
+ def same_site; end
119
+
120
+ # Returns the value of attribute sid_secure.
121
+ #
122
+ # source://rack-session//lib/rack/session/abstract/id.rb#254
123
+ def sid_secure; end
124
+
125
+ private
126
+
127
+ # Session should be committed if it was loaded, any of specific options like :renew, :drop
128
+ # or :expire_after was given and the security permissions match. Skips if skip is given.
129
+ #
130
+ # @return [Boolean]
131
+ #
132
+ # source://rack-session//lib/rack/session/abstract/id.rb#348
133
+ def commit_session?(req, session, options); end
134
+
135
+ # source://rack-session//lib/rack/session/abstract/id.rb#414
136
+ def cookie_value(data); end
137
+
138
+ # Returns the current session id from the SessionHash.
139
+ #
140
+ # source://rack-session//lib/rack/session/abstract/id.rb#334
141
+ def current_session_id(req); end
142
+
143
+ # All thread safety and session destroy procedures should occur here.
144
+ # Should return a new session id or nil if options[:drop]
145
+ #
146
+ # source://rack-session//lib/rack/session/abstract/id.rb#453
147
+ def delete_session(req, sid, options); end
148
+
149
+ # Extract session id from request object.
150
+ #
151
+ # source://rack-session//lib/rack/session/abstract/id.rb#326
152
+ def extract_session_id(request); end
153
+
154
+ # All thread safety and session retrieval procedures should occur here.
155
+ # Should return [session_id, session].
156
+ # If nil is provided as the session id, generation of a new valid id
157
+ # should occur within.
158
+ #
159
+ # source://rack-session//lib/rack/session/abstract/id.rb#438
160
+ def find_session(env, sid); end
161
+
162
+ # @return [Boolean]
163
+ #
164
+ # source://rack-session//lib/rack/session/abstract/id.rb#365
165
+ def force_options?(options); end
166
+
167
+ # @return [Boolean]
168
+ #
169
+ # source://rack-session//lib/rack/session/abstract/id.rb#361
170
+ def forced_session_update?(session, options); end
171
+
172
+ # Generate a new session id using Ruby #rand. The size of the
173
+ # session id is controlled by the :sidbits option.
174
+ # Monkey patch this to use custom methods for session id generation.
175
+ #
176
+ # source://rack-session//lib/rack/session/abstract/id.rb#294
177
+ def generate_sid(secure = T.unsafe(nil)); end
178
+
179
+ # source://rack-session//lib/rack/session/abstract/id.rb#284
180
+ def initialize_sid; end
181
+
182
+ # Extracts the session id from provided cookies and passes it and the
183
+ # environment to #find_session.
184
+ #
185
+ # source://rack-session//lib/rack/session/abstract/id.rb#318
186
+ def load_session(req); end
187
+
188
+ # @return [Boolean]
189
+ #
190
+ # source://rack-session//lib/rack/session/abstract/id.rb#357
191
+ def loaded_session?(session); end
192
+
193
+ # source://rack-session//lib/rack/session/abstract/id.rb#280
194
+ def make_request(env); end
195
+
196
+ # Sets the lazy session at 'rack.session' and places options and session
197
+ # metadata into 'rack.session.options'.
198
+ #
199
+ # source://rack-session//lib/rack/session/abstract/id.rb#307
200
+ def prepare_session(req); end
201
+
202
+ # @return [Boolean]
203
+ #
204
+ # source://rack-session//lib/rack/session/abstract/id.rb#369
205
+ def security_matches?(request, options); end
206
+
207
+ # Allow subclasses to prepare_session for different Session classes
208
+ #
209
+ # source://rack-session//lib/rack/session/abstract/id.rb#429
210
+ def session_class; end
211
+
212
+ # Check if the session exists or not.
213
+ #
214
+ # @return [Boolean]
215
+ #
216
+ # source://rack-session//lib/rack/session/abstract/id.rb#340
217
+ def session_exists?(req); end
218
+
219
+ # Sets the cookie back to the client with session id. We skip the cookie
220
+ # setting if the value didn't change (sid is the same) or expires was given.
221
+ #
222
+ # source://rack-session//lib/rack/session/abstract/id.rb#421
223
+ def set_cookie(request, response, cookie); end
224
+
225
+ # All thread safety and session storage procedures should occur here.
226
+ # Must return the session id if the session was saved successfully, or
227
+ # false if the session could not be saved.
228
+ #
229
+ # source://rack-session//lib/rack/session/abstract/id.rb#446
230
+ def write_session(req, sid, session, options); end
231
+ end
232
+
233
+ # source://rack-session//lib/rack/session/abstract/id.rb#240
234
+ Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
235
+
236
+ # source://rack-session//lib/rack/session/abstract/id.rb#458
237
+ class Rack::Session::Abstract::PersistedSecure < ::Rack::Session::Abstract::Persisted
238
+ # source://rack-session//lib/rack/session/abstract/id.rb#481
239
+ def extract_session_id(*_arg0); end
240
+
241
+ # source://rack-session//lib/rack/session/abstract/id.rb#475
242
+ def generate_sid(*_arg0); end
243
+
244
+ private
245
+
246
+ # source://rack-session//lib/rack/session/abstract/id.rb#492
247
+ def cookie_value(data); end
248
+
249
+ # source://rack-session//lib/rack/session/abstract/id.rb#488
250
+ def session_class; end
251
+ end
252
+
253
+ # source://rack-session//lib/rack/session/abstract/id.rb#459
254
+ class Rack::Session::Abstract::PersistedSecure::SecureSessionHash < ::Rack::Session::Abstract::SessionHash
255
+ # source://rack-session//lib/rack/session/abstract/id.rb#460
256
+ def [](key); end
257
+ end
258
+
259
+ # SessionHash is responsible to lazily load the session from store.
260
+ #
261
+ # source://rack-session//lib/rack/session/abstract/id.rb#50
262
+ class Rack::Session::Abstract::SessionHash
263
+ include ::Enumerable
264
+
265
+ # @return [SessionHash] a new instance of SessionHash
266
+ #
267
+ # source://rack-session//lib/rack/session/abstract/id.rb#68
268
+ def initialize(store, req); end
269
+
270
+ # source://rack-session//lib/rack/session/abstract/id.rb#88
271
+ def [](key); end
272
+
273
+ # source://rack-session//lib/rack/session/abstract/id.rb#114
274
+ def []=(key, value); end
275
+
276
+ # source://rack-session//lib/rack/session/abstract/id.rb#120
277
+ def clear; end
278
+
279
+ # source://rack-session//lib/rack/session/abstract/id.rb#146
280
+ def delete(key); end
281
+
282
+ # source://rack-session//lib/rack/session/abstract/id.rb#125
283
+ def destroy; end
284
+
285
+ # source://rack-session//lib/rack/session/abstract/id.rb#93
286
+ def dig(key, *keys); end
287
+
288
+ # source://rack-session//lib/rack/session/abstract/id.rb#83
289
+ def each(&block); end
290
+
291
+ # @return [Boolean]
292
+ #
293
+ # source://rack-session//lib/rack/session/abstract/id.rb#169
294
+ def empty?; end
295
+
296
+ # @return [Boolean]
297
+ #
298
+ # source://rack-session//lib/rack/session/abstract/id.rb#159
299
+ def exists?; end
300
+
301
+ # source://rack-session//lib/rack/session/abstract/id.rb#98
302
+ def fetch(key, default = T.unsafe(nil), &block); end
303
+
304
+ # @return [Boolean]
305
+ #
306
+ # source://rack-session//lib/rack/session/abstract/id.rb#107
307
+ def has_key?(key); end
308
+
309
+ # source://rack-session//lib/rack/session/abstract/id.rb#74
310
+ def id; end
311
+
312
+ # Sets the attribute id
313
+ #
314
+ # @param value the value to set the attribute id to.
315
+ #
316
+ # source://rack-session//lib/rack/session/abstract/id.rb#52
317
+ def id=(_arg0); end
318
+
319
+ # @return [Boolean]
320
+ #
321
+ # source://rack-session//lib/rack/session/abstract/id.rb#107
322
+ def include?(key); end
323
+
324
+ # source://rack-session//lib/rack/session/abstract/id.rb#151
325
+ def inspect; end
326
+
327
+ # @return [Boolean]
328
+ #
329
+ # source://rack-session//lib/rack/session/abstract/id.rb#107
330
+ def key?(key); end
331
+
332
+ # source://rack-session//lib/rack/session/abstract/id.rb#174
333
+ def keys; end
334
+
335
+ # @return [Boolean]
336
+ #
337
+ # source://rack-session//lib/rack/session/abstract/id.rb#165
338
+ def loaded?; end
339
+
340
+ # source://rack-session//lib/rack/session/abstract/id.rb#135
341
+ def merge!(hash); end
342
+
343
+ # source://rack-session//lib/rack/session/abstract/id.rb#79
344
+ def options; end
345
+
346
+ # source://rack-session//lib/rack/session/abstract/id.rb#141
347
+ def replace(hash); end
348
+
349
+ # source://rack-session//lib/rack/session/abstract/id.rb#114
350
+ def store(key, value); end
351
+
352
+ # source://rack-session//lib/rack/session/abstract/id.rb#130
353
+ def to_hash; end
354
+
355
+ # source://rack-session//lib/rack/session/abstract/id.rb#135
356
+ def update(hash); end
357
+
358
+ # source://rack-session//lib/rack/session/abstract/id.rb#179
359
+ def values; end
360
+
361
+ private
362
+
363
+ # source://rack-session//lib/rack/session/abstract/id.rb#194
364
+ def load!; end
365
+
366
+ # source://rack-session//lib/rack/session/abstract/id.rb#186
367
+ def load_for_read!; end
368
+
369
+ # source://rack-session//lib/rack/session/abstract/id.rb#190
370
+ def load_for_write!; end
371
+
372
+ # source://rack-session//lib/rack/session/abstract/id.rb#200
373
+ def stringify_keys(other); end
374
+
375
+ class << self
376
+ # source://rack-session//lib/rack/session/abstract/id.rb#56
377
+ def find(req); end
378
+
379
+ # source://rack-session//lib/rack/session/abstract/id.rb#60
380
+ def set(req, session); end
381
+
382
+ # source://rack-session//lib/rack/session/abstract/id.rb#64
383
+ def set_options(req, options); end
384
+ end
385
+ end
386
+
387
+ # source://rack-session//lib/rack/session/abstract/id.rb#54
388
+ Rack::Session::Abstract::SessionHash::Unspecified = T.let(T.unsafe(nil), Object)
389
+
390
+ # Rack::Session::Cookie provides simple cookie based session management.
391
+ # By default, the session is a Ruby Hash that is serialized and encoded as
392
+ # a cookie set to :key (default: rack.session).
393
+ #
394
+ # This middleware accepts a :secrets option which enables encryption of
395
+ # session cookies. This option should be one or more random "secret keys"
396
+ # that are each at least 64 bytes in length. Multiple secret keys can be
397
+ # supplied in an Array, which is useful when rotating secrets.
398
+ #
399
+ # Several options are also accepted that are passed to Rack::Session::Encryptor.
400
+ # These options include:
401
+ # * :serialize_json
402
+ # Use JSON for message serialization instead of Marshal. This can be
403
+ # viewed as a security enhancement.
404
+ # * :gzip_over
405
+ # For message data over this many bytes, compress it with the deflate
406
+ # algorithm.
407
+ #
408
+ # Refer to Rack::Session::Encryptor for more details on these options.
409
+ #
410
+ # Prior to version TODO, the session hash was stored as base64 encoded
411
+ # marshalled data. When a :secret option was supplied, the integrity of the
412
+ # encoded data was protected with HMAC-SHA1. This functionality is still
413
+ # supported using a set of a legacy options.
414
+ #
415
+ # Lastly, a :coder option is also accepted. When used, both encryption and
416
+ # the legacy HMAC will be skipped. This option could create security issues
417
+ # in your application!
418
+ #
419
+ # Example:
420
+ #
421
+ # use Rack::Session::Cookie, {
422
+ # key: 'rack.session',
423
+ # domain: 'foo.com',
424
+ # path: '/',
425
+ # expire_after: 2592000,
426
+ # secrets: 'a randomly generated, raw binary string 64 bytes in size',
427
+ # }
428
+ #
429
+ # Example using legacy HMAC options:
430
+ #
431
+ # Rack::Session:Cookie.new(application, {
432
+ # # The secret used for legacy HMAC cookies, this enables the functionality
433
+ # legacy_hmac_secret: 'legacy secret',
434
+ # # legacy_hmac_coder will default to Rack::Session::Cookie::Base64::Marshal
435
+ # legacy_hmac_coder: Rack::Session::Cookie::Identity.new,
436
+ # # legacy_hmac will default to OpenSSL::Digest::SHA1
437
+ # legacy_hmac: OpenSSL::Digest::SHA256
438
+ # })
439
+ #
440
+ #
441
+ # Rack::Session::Cookie.new(application, {
442
+ # :coder => Rack::Session::Cookie::Identity.new
443
+ # })
444
+ #
445
+ #
446
+ # Rack::Session::Cookie.new(application, {
447
+ # :coder => Class.new {
448
+ # def encode(str); str.reverse; end
449
+ # def decode(str); str.reverse; end
450
+ # }.new
451
+ # })
452
+ #
453
+ # source://rack-session//lib/rack/session/cookie.rb#91
454
+ class Rack::Session::Cookie < ::Rack::Session::Abstract::PersistedSecure
455
+ # @return [Cookie] a new instance of Cookie
456
+ #
457
+ # source://rack-session//lib/rack/session/cookie.rb#159
458
+ def initialize(app, options = T.unsafe(nil)); end
459
+
460
+ # Returns the value of attribute coder.
461
+ #
462
+ # source://rack-session//lib/rack/session/cookie.rb#157
463
+ def coder; end
464
+
465
+ # Returns the value of attribute encryptors.
466
+ #
467
+ # source://rack-session//lib/rack/session/cookie.rb#157
468
+ def encryptors; end
469
+
470
+ private
471
+
472
+ # source://rack-session//lib/rack/session/cookie.rb#277
473
+ def delete_session(req, session_id, options); end
474
+
475
+ # source://rack-session//lib/rack/session/cookie.rb#292
476
+ def encode_session_data(session); end
477
+
478
+ # source://rack-session//lib/rack/session/cookie.rb#209
479
+ def extract_session_id(request); end
480
+
481
+ # source://rack-session//lib/rack/session/cookie.rb#203
482
+ def find_session(req, sid); end
483
+
484
+ # @return [Boolean]
485
+ #
486
+ # source://rack-session//lib/rack/session/cookie.rb#282
487
+ def legacy_digest_match?(data, digest); end
488
+
489
+ # source://rack-session//lib/rack/session/cookie.rb#288
490
+ def legacy_generate_hmac(data); end
491
+
492
+ # source://rack-session//lib/rack/session/cookie.rb#250
493
+ def persistent_session_id!(data, sid = T.unsafe(nil)); end
494
+
495
+ # Were consider "secure" if:
496
+ # * Encrypted cookies are enabled and one or more encryptor is
497
+ # initialized
498
+ # * The legacy HMAC option is enabled
499
+ # * Customer :coder is used, with :let_coder_handle_secure_encoding
500
+ # set to true
501
+ #
502
+ # @return [Boolean]
503
+ #
504
+ # source://rack-session//lib/rack/session/cookie.rb#306
505
+ def secure?(options); end
506
+
507
+ # source://rack-session//lib/rack/session/cookie.rb#213
508
+ def unpacked_cookie_data(request); end
509
+
510
+ # source://rack-session//lib/rack/session/cookie.rb#265
511
+ def write_session(req, session_id, session, options); end
512
+ end
513
+
514
+ # Encode session cookies as Base64
515
+ #
516
+ # source://rack-session//lib/rack/session/cookie.rb#93
517
+ class Rack::Session::Cookie::Base64
518
+ # source://rack-session//lib/rack/session/cookie.rb#98
519
+ def decode(str); end
520
+
521
+ # source://rack-session//lib/rack/session/cookie.rb#94
522
+ def encode(str); end
523
+ end
524
+
525
+ # N.B. Unlike other encoding methods, the contained objects must be a
526
+ # valid JSON composite type, either a Hash or an Array.
527
+ #
528
+ # source://rack-session//lib/rack/session/cookie.rb#116
529
+ class Rack::Session::Cookie::Base64::JSON < ::Rack::Session::Cookie::Base64
530
+ # source://rack-session//lib/rack/session/cookie.rb#121
531
+ def decode(str); end
532
+
533
+ # source://rack-session//lib/rack/session/cookie.rb#117
534
+ def encode(obj); end
535
+ end
536
+
537
+ # Encode session cookies as Marshaled Base64 data
538
+ #
539
+ # source://rack-session//lib/rack/session/cookie.rb#103
540
+ class Rack::Session::Cookie::Base64::Marshal < ::Rack::Session::Cookie::Base64
541
+ # source://rack-session//lib/rack/session/cookie.rb#108
542
+ def decode(str); end
543
+
544
+ # source://rack-session//lib/rack/session/cookie.rb#104
545
+ def encode(str); end
546
+ end
547
+
548
+ # source://rack-session//lib/rack/session/cookie.rb#127
549
+ class Rack::Session::Cookie::Base64::ZipJSON < ::Rack::Session::Cookie::Base64
550
+ # source://rack-session//lib/rack/session/cookie.rb#132
551
+ def decode(str); end
552
+
553
+ # source://rack-session//lib/rack/session/cookie.rb#128
554
+ def encode(obj); end
555
+ end
556
+
557
+ # Use no encoding for session cookies
558
+ #
559
+ # source://rack-session//lib/rack/session/cookie.rb#142
560
+ class Rack::Session::Cookie::Identity
561
+ # source://rack-session//lib/rack/session/cookie.rb#144
562
+ def decode(str); end
563
+
564
+ # source://rack-session//lib/rack/session/cookie.rb#143
565
+ def encode(str); end
566
+ end
567
+
568
+ # source://rack-session//lib/rack/session/cookie.rb#147
569
+ class Rack::Session::Cookie::Marshal
570
+ # source://rack-session//lib/rack/session/cookie.rb#152
571
+ def decode(str); end
572
+
573
+ # source://rack-session//lib/rack/session/cookie.rb#148
574
+ def encode(str); end
575
+ end
576
+
577
+ # source://rack-session//lib/rack/session/cookie.rb#256
578
+ class Rack::Session::Cookie::SessionId
579
+ # @return [SessionId] a new instance of SessionId
580
+ #
581
+ # source://rack-session//lib/rack/session/cookie.rb#259
582
+ def initialize(session_id, cookie_value); end
583
+
584
+ # Returns the value of attribute cookie_value.
585
+ #
586
+ # source://rack-session//lib/rack/session/cookie.rb#257
587
+ def cookie_value; end
588
+ end
589
+
590
+ # source://rack-session//lib/rack/session/encryptor.rb#16
591
+ class Rack::Session::Encryptor
592
+ # The secret String must be at least 64 bytes in size. The first 32 bytes
593
+ # will be used for the encryption cipher key. The remainder will be used
594
+ # for an HMAC key.
595
+ #
596
+ # Options may include:
597
+ # * :serialize_json
598
+ # Use JSON for message serialization instead of Marshal. This can be
599
+ # viewed as a security enhancement.
600
+ # * :pad_size
601
+ # Pad encrypted message data, to a multiple of this many bytes
602
+ # (default: 32). This can be between 2-4096 bytes, or +nil+ to disable
603
+ # padding.
604
+ # * :purpose
605
+ # Limit messages to a specific purpose. This can be viewed as a
606
+ # security enhancement to prevent message reuse from different contexts
607
+ # if keys are reused.
608
+ #
609
+ # Cryptography and Output Format:
610
+ #
611
+ # urlsafe_encode64(version + random_data + IV + encrypted data + HMAC)
612
+ #
613
+ # Where:
614
+ # * version - 1 byte and is currently always 0x01
615
+ # * random_data - 32 bytes used for generating the per-message secret
616
+ # * IV - 16 bytes random initialization vector
617
+ # * HMAC - 32 bytes HMAC-SHA-256 of all preceding data, plus the purpose
618
+ # value
619
+ #
620
+ # @raise [ArgumentError]
621
+ # @return [Encryptor] a new instance of Encryptor
622
+ #
623
+ # source://rack-session//lib/rack/session/encryptor.rb#53
624
+ def initialize(secret, opts = T.unsafe(nil)); end
625
+
626
+ # source://rack-session//lib/rack/session/encryptor.rb#77
627
+ def decrypt(base64_data); end
628
+
629
+ # source://rack-session//lib/rack/session/encryptor.rb#102
630
+ def encrypt(message); end
631
+
632
+ private
633
+
634
+ # source://rack-session//lib/rack/session/encryptor.rb#139
635
+ def cipher_secret_from_message_secret(message_secret); end
636
+
637
+ # source://rack-session//lib/rack/session/encryptor.rb#151
638
+ def compute_signature(data); end
639
+
640
+ # Return the deserialized message. The first 2 bytes will be read as the
641
+ # amount of padding.
642
+ #
643
+ # source://rack-session//lib/rack/session/encryptor.rb#182
644
+ def deserialized_message(data); end
645
+
646
+ # source://rack-session//lib/rack/session/encryptor.rb#129
647
+ def new_cipher; end
648
+
649
+ # source://rack-session//lib/rack/session/encryptor.rb#133
650
+ def new_message_and_cipher_secret; end
651
+
652
+ # Returns a serialized payload of the message. If a :pad_size is supplied,
653
+ # the message will be padded. The first 2 bytes of the returned string will
654
+ # indicating the amount of padding.
655
+ #
656
+ # source://rack-session//lib/rack/session/encryptor.rb#169
657
+ def serialize_payload(message); end
658
+
659
+ # source://rack-session//lib/rack/session/encryptor.rb#147
660
+ def serializer; end
661
+
662
+ # source://rack-session//lib/rack/session/encryptor.rb#143
663
+ def set_cipher_key(cipher, key); end
664
+
665
+ # @raise [InvalidMessage]
666
+ #
667
+ # source://rack-session//lib/rack/session/encryptor.rb#158
668
+ def verify_authenticity!(data, signature); end
669
+ end
670
+
671
+ # source://rack-session//lib/rack/session/encryptor.rb#17
672
+ class Rack::Session::Encryptor::Error < ::StandardError; end
673
+
674
+ # source://rack-session//lib/rack/session/encryptor.rb#23
675
+ class Rack::Session::Encryptor::InvalidMessage < ::Rack::Session::Encryptor::Error; end
676
+
677
+ # source://rack-session//lib/rack/session/encryptor.rb#20
678
+ class Rack::Session::Encryptor::InvalidSignature < ::Rack::Session::Encryptor::Error; end
679
+
680
+ # source://rack-session//lib/rack/session/constants.rb#9
681
+ Rack::Session::RACK_SESSION = T.let(T.unsafe(nil), String)
682
+
683
+ # source://rack-session//lib/rack/session/constants.rb#10
684
+ Rack::Session::RACK_SESSION_OPTIONS = T.let(T.unsafe(nil), String)
685
+
686
+ # source://rack-session//lib/rack/session/constants.rb#11
687
+ Rack::Session::RACK_SESSION_UNPACKED_COOKIE_DATA = T.let(T.unsafe(nil), String)
688
+
689
+ # source://rack-session//lib/rack/session/abstract/id.rb#21
690
+ class Rack::Session::SessionId
691
+ # @return [SessionId] a new instance of SessionId
692
+ #
693
+ # source://rack-session//lib/rack/session/abstract/id.rb#26
694
+ def initialize(public_id); end
695
+
696
+ # Returns the value of attribute public_id.
697
+ #
698
+ # source://rack-session//lib/rack/session/abstract/id.rb#24
699
+ def cookie_value; end
700
+
701
+ # @return [Boolean]
702
+ #
703
+ # source://rack-session//lib/rack/session/abstract/id.rb#37
704
+ def empty?; end
705
+
706
+ # source://rack-session//lib/rack/session/abstract/id.rb#38
707
+ def inspect; end
708
+
709
+ # source://rack-session//lib/rack/session/abstract/id.rb#30
710
+ def private_id; end
711
+
712
+ # Returns the value of attribute public_id.
713
+ #
714
+ # source://rack-session//lib/rack/session/abstract/id.rb#24
715
+ def public_id; end
716
+
717
+ # Returns the value of attribute public_id.
718
+ #
719
+ # source://rack-session//lib/rack/session/abstract/id.rb#24
720
+ def to_s; end
721
+
722
+ private
723
+
724
+ # source://rack-session//lib/rack/session/abstract/id.rb#42
725
+ def hash_sid(sid); end
726
+ end
727
+
728
+ # source://rack-session//lib/rack/session/abstract/id.rb#22
729
+ Rack::Session::SessionId::ID_VERSION = T.let(T.unsafe(nil), Integer)