castanet 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,120 @@
1
+ require 'castanet'
2
+
3
+ %%{
4
+ machine proxy;
5
+
6
+ include common "common.rl";
7
+
8
+ # Actions
9
+ # -------
10
+
11
+ action save_failure_code { r.failure_code = buffer; buffer = '' }
12
+ action save_failure_reason { r.failure_reason = buffer.strip; buffer = '' }
13
+ action save_pt { r.ticket = buffer; buffer = '' }
14
+ action set_success { r.ok = true }
15
+
16
+ # Leaf tags
17
+ # ---------
18
+
19
+ proxy_ticket = "<cas:proxyTicket>"
20
+ ( ticket_character @buffer )*
21
+ "</cas:proxyTicket>" %save_pt;
22
+
23
+ # Non-leaf tags
24
+ # -------------
25
+
26
+ proxy_success_start = "<cas:proxySuccess>";
27
+ proxy_success_end = "</cas:proxySuccess>";
28
+
29
+ proxy_failure_start = "<cas:proxyFailure code="
30
+ quote
31
+ failure_code %save_failure_code
32
+ quote
33
+ ">";
34
+ proxy_failure_end = "</cas:proxyFailure>";
35
+
36
+ # Top-level elements
37
+ # ------------------
38
+
39
+ success = service_response_start
40
+ space*
41
+ proxy_success_start
42
+ space*
43
+ proxy_ticket
44
+ space*
45
+ proxy_success_end
46
+ space*
47
+ service_response_end @set_success;
48
+
49
+ failure = service_response_start
50
+ space*
51
+ proxy_failure_start
52
+ failure_reason %save_failure_reason
53
+ proxy_failure_end
54
+ space*
55
+ service_response_end;
56
+
57
+ main := success | failure;
58
+ }%%
59
+
60
+ module Castanet::Responses
61
+ ##
62
+ # A parsed representation of responses from `/proxy`.
63
+ #
64
+ # The code in this class implements a state machine generated by Ragel. The
65
+ # state machine definition is in proxy.rl.
66
+ class Proxy
67
+ ##
68
+ # Whether or not a proxy ticket could be issued.
69
+ #
70
+ # @return [Boolean]
71
+ attr_accessor :ok
72
+
73
+ alias_method :ok?, :ok
74
+
75
+ ##
76
+ # The proxy ticket issued by the CAS server.
77
+ #
78
+ # If {#ok} is false, this will be `nil`.
79
+ #
80
+ # @return [String, nil]
81
+ attr_accessor :ticket
82
+
83
+ ##
84
+ # On ticket issuance failure, contains the code identifying the
85
+ # nature of the failure.
86
+ #
87
+ # On success, is nil.
88
+ #
89
+ # @see http://www.jasig.org/cas/protocol CAS protocol, sections 2.7.2 and 2.7.3
90
+ # @return [String, nil]
91
+ attr_accessor :failure_code
92
+
93
+ ##
94
+ # On ticket issuance failure, contains the failure reason.
95
+ #
96
+ # On success, is nil.
97
+ #
98
+ # @see http://www.jasig.org/cas/protocol CAS protocol, section 2.7.2
99
+ # @return [String, nil]
100
+ attr_accessor :failure_reason
101
+
102
+ ##
103
+ # Generates a {Proxy} object from a CAS response.
104
+ #
105
+ # @param [String] response the CAS response
106
+ # @return [Proxy]
107
+ def self.from_cas(response)
108
+ data = response.strip.unpack('U*')
109
+ buffer = ''
110
+
111
+ %% write init;
112
+
113
+ new.tap do |r|
114
+ %% write exec;
115
+ end
116
+ end
117
+
118
+ %% write data;
119
+ end
120
+ end
@@ -0,0 +1,720 @@
1
+
2
+ require 'castanet'
3
+
4
+
5
+
6
+
7
+ module Castanet::Responses
8
+ ##
9
+ # A parsed representation of responses from `/serviceValidate` or
10
+ # `/proxyValidate`.
11
+ #
12
+ # The responses for the above services are identical, so we implement their
13
+ # parser with the same state machine.
14
+ #
15
+ # The code in this class implements a state machine generated by Ragel. The
16
+ # state machine definition is in ticket_validate.rl.
17
+ #
18
+ # @see http://www.jasig.org/cas/protocol CAS 2.0 protocol, sections 2.5, 2.6,
19
+ # and appendix A
20
+ class TicketValidate
21
+ ##
22
+ # Whether or not this response passed CAS authentication.
23
+ #
24
+ # @return [Boolean]
25
+ attr_accessor :ok
26
+
27
+ alias_method :ok?, :ok
28
+
29
+ ##
30
+ # The failure code returned on authentication failure.
31
+ #
32
+ # @return [String, nil]
33
+ attr_accessor :failure_code
34
+
35
+ ##
36
+ # The reason given by the CAS server for authentication failure.
37
+ #
38
+ # @return [String, nil]
39
+ attr_accessor :failure_reason
40
+
41
+ ##
42
+ # The PGT IOU returned by an authentication success message.
43
+ #
44
+ # @return [String, nil]
45
+ attr_accessor :pgt_iou
46
+
47
+ ##
48
+ # A list of authentication proxies for this ticket.
49
+ #
50
+ # Each participant in an authentication chain adds one entry to this list.
51
+ # As an example, assume the existence of two services:
52
+ #
53
+ # 1. frontend
54
+ # 2. backend
55
+ #
56
+ # If `frontend` proxied access to `backend`, the proxy list would be
57
+ #
58
+ # 1. backend
59
+ # 2. frontend
60
+ #
61
+ # The proxy chain has an unbounded maximum length. The proxy order
62
+ # specified in the CAS response is preserved.
63
+ #
64
+ # For proxy tickets that fail validation, this will be an empty list. It
65
+ # should also be an empty list for service tickets too, although that's
66
+ # really up to the CAS server.
67
+ #
68
+ # Although this list is technically a valid component of an authentication
69
+ # response issued by `/serviceValidate`, it's really only applicable to
70
+ # proxy tickets.
71
+ #
72
+ # @see http://www.jasig.org/cas/protocol CAS 2.0 protocol, section 2.6.2
73
+ # @return [Array]
74
+ attr_accessor :proxies
75
+
76
+ ##
77
+ # The name of the owner of the validated service or proxy ticket.
78
+ #
79
+ # This information is only present on authentication success.
80
+ #
81
+ # @return [String, nil]
82
+ attr_accessor :username
83
+
84
+ ##
85
+ # Generates a {TicketValidate} object from a CAS response.
86
+ #
87
+ # @param [String] response the CAS response
88
+ # @return [TicketValidate}
89
+ def self.from_cas(response)
90
+ data = response.strip.unpack('U*')
91
+ buffer = ''
92
+
93
+
94
+ begin
95
+ p ||= 0
96
+ pe ||= data.length
97
+ cs = ticket_validate_start
98
+ end
99
+
100
+
101
+ new.tap do |r|
102
+
103
+ begin
104
+ _klen, _trans, _keys, _acts, _nacts = nil
105
+ _goto_level = 0
106
+ _resume = 10
107
+ _eof_trans = 15
108
+ _again = 20
109
+ _test_eof = 30
110
+ _out = 40
111
+ while true
112
+ _trigger_goto = false
113
+ if _goto_level <= 0
114
+ if p == pe
115
+ _goto_level = _test_eof
116
+ next
117
+ end
118
+ if cs == 0
119
+ _goto_level = _out
120
+ next
121
+ end
122
+ end
123
+ if _goto_level <= _resume
124
+ _keys = _ticket_validate_key_offsets[cs]
125
+ _trans = _ticket_validate_index_offsets[cs]
126
+ _klen = _ticket_validate_single_lengths[cs]
127
+ _break_match = false
128
+
129
+ begin
130
+ if _klen > 0
131
+ _lower = _keys
132
+ _upper = _keys + _klen - 1
133
+
134
+ loop do
135
+ break if _upper < _lower
136
+ _mid = _lower + ( (_upper - _lower) >> 1 )
137
+
138
+ if data[p] < _ticket_validate_trans_keys[_mid]
139
+ _upper = _mid - 1
140
+ elsif data[p] > _ticket_validate_trans_keys[_mid]
141
+ _lower = _mid + 1
142
+ else
143
+ _trans += (_mid - _keys)
144
+ _break_match = true
145
+ break
146
+ end
147
+ end # loop
148
+ break if _break_match
149
+ _keys += _klen
150
+ _trans += _klen
151
+ end
152
+ _klen = _ticket_validate_range_lengths[cs]
153
+ if _klen > 0
154
+ _lower = _keys
155
+ _upper = _keys + (_klen << 1) - 2
156
+ loop do
157
+ break if _upper < _lower
158
+ _mid = _lower + (((_upper-_lower) >> 1) & ~1)
159
+ if data[p] < _ticket_validate_trans_keys[_mid]
160
+ _upper = _mid - 2
161
+ elsif data[p] > _ticket_validate_trans_keys[_mid+1]
162
+ _lower = _mid + 2
163
+ else
164
+ _trans += ((_mid - _keys) >> 1)
165
+ _break_match = true
166
+ break
167
+ end
168
+ end # loop
169
+ break if _break_match
170
+ _trans += _klen
171
+ end
172
+ end while false
173
+ cs = _ticket_validate_trans_targs[_trans]
174
+ if _ticket_validate_trans_actions[_trans] != 0
175
+ _acts = _ticket_validate_trans_actions[_trans]
176
+ _nacts = _ticket_validate_actions[_acts]
177
+ _acts += 1
178
+ while _nacts > 0
179
+ _nacts -= 1
180
+ _acts += 1
181
+ case _ticket_validate_actions[_acts - 1]
182
+ when 0 then
183
+ begin
184
+ r.username = buffer; buffer = '' end
185
+ when 1 then
186
+ begin
187
+ r.failure_code = buffer; buffer = '' end
188
+ when 2 then
189
+ begin
190
+ r.failure_reason = buffer.strip; buffer = '' end
191
+ when 3 then
192
+ begin
193
+ r.pgt_iou = buffer; buffer = '' end
194
+ when 4 then
195
+ begin
196
+ r.proxies << buffer; buffer = '' end
197
+ when 5 then
198
+ begin
199
+ r.ok = true end
200
+ when 6 then
201
+ begin
202
+ buffer << data[p] end
203
+ end # action switch
204
+ end
205
+ end
206
+ if _trigger_goto
207
+ next
208
+ end
209
+ end
210
+ if _goto_level <= _again
211
+ if cs == 0
212
+ _goto_level = _out
213
+ next
214
+ end
215
+ p += 1
216
+ if p != pe
217
+ _goto_level = _resume
218
+ next
219
+ end
220
+ end
221
+ if _goto_level <= _test_eof
222
+ end
223
+ if _goto_level <= _out
224
+ break
225
+ end
226
+ end
227
+ end
228
+
229
+ end
230
+ end
231
+
232
+ def initialize
233
+ self.ok = false
234
+ self.proxies = []
235
+ end
236
+
237
+
238
+ class << self
239
+ attr_accessor :_ticket_validate_actions
240
+ private :_ticket_validate_actions, :_ticket_validate_actions=
241
+ end
242
+ self._ticket_validate_actions = [
243
+ 0, 1, 0, 1, 1, 1, 2, 1,
244
+ 3, 1, 4, 1, 5, 1, 6
245
+ ]
246
+
247
+ class << self
248
+ attr_accessor :_ticket_validate_key_offsets
249
+ private :_ticket_validate_key_offsets, :_ticket_validate_key_offsets=
250
+ end
251
+ self._ticket_validate_key_offsets = [
252
+ 0, 0, 1, 2, 3, 4, 5, 6,
253
+ 7, 8, 9, 10, 11, 12, 13, 14,
254
+ 15, 16, 17, 18, 19, 20, 21, 22,
255
+ 23, 24, 25, 26, 27, 28, 29, 30,
256
+ 31, 33, 34, 35, 36, 37, 38, 39,
257
+ 40, 41, 42, 43, 44, 45, 46, 47,
258
+ 48, 49, 50, 51, 52, 53, 54, 55,
259
+ 56, 57, 58, 59, 61, 62, 66, 67,
260
+ 68, 69, 70, 71, 72, 73, 74, 75,
261
+ 76, 77, 78, 79, 80, 81, 82, 83,
262
+ 84, 86, 87, 88, 89, 90, 91, 92,
263
+ 93, 94, 95, 96, 97, 98, 100, 105,
264
+ 106, 109, 110, 111, 112, 113, 114, 115,
265
+ 116, 117, 118, 119, 120, 121, 122, 123,
266
+ 124, 125, 126, 127, 128, 129, 130, 131,
267
+ 132, 133, 134, 135, 136, 140, 141, 142,
268
+ 143, 144, 145, 146, 147, 148, 149, 150,
269
+ 151, 152, 153, 154, 155, 156, 157, 158,
270
+ 159, 160, 161, 164, 168, 169, 170, 171,
271
+ 172, 173, 174, 175, 179, 180, 181, 182,
272
+ 183, 184, 185, 186, 187, 188, 191, 192,
273
+ 193, 194, 195, 196, 197, 198, 199, 200,
274
+ 201, 205, 209, 211, 212, 213, 214, 215,
275
+ 216, 217, 218, 219, 220, 221, 222, 223,
276
+ 224, 225, 226, 227, 228, 229, 230, 231,
277
+ 232, 233, 234, 235, 236, 237, 241, 242,
278
+ 243, 244, 245, 246, 247, 248, 249, 250,
279
+ 251, 252, 253, 254, 255, 256, 257, 258,
280
+ 259, 260, 261, 262, 263, 264, 265, 266,
281
+ 267, 268, 269, 271, 272, 273, 274, 278,
282
+ 282, 283, 284, 285, 286, 287, 288, 289,
283
+ 290, 291, 292, 295, 296, 297, 298, 299,
284
+ 300, 301, 302, 303, 304, 305, 306, 310,
285
+ 314, 316, 317, 318, 319, 320, 321, 322,
286
+ 323, 324, 325, 326, 327, 328, 332, 333,
287
+ 336, 340, 341, 342, 343, 344, 345, 346,
288
+ 347, 348, 349, 350, 351, 352, 353, 354,
289
+ 355, 363, 364, 365, 366, 367, 368, 369,
290
+ 370, 371, 372, 373, 374, 375, 376, 377,
291
+ 378, 379, 380, 381, 382, 383, 384, 385,
292
+ 386, 387, 388, 392, 396, 398, 399, 400,
293
+ 401, 402, 403, 404, 405, 406, 409, 413
294
+ ]
295
+
296
+ class << self
297
+ attr_accessor :_ticket_validate_trans_keys
298
+ private :_ticket_validate_trans_keys, :_ticket_validate_trans_keys=
299
+ end
300
+ self._ticket_validate_trans_keys = [
301
+ 60, 99, 97, 115, 58, 115, 101, 114,
302
+ 118, 105, 99, 101, 82, 101, 115, 112,
303
+ 111, 110, 115, 101, 32, 120, 109, 108,
304
+ 110, 115, 58, 99, 97, 115, 61, 34,
305
+ 39, 104, 116, 116, 112, 58, 47, 47,
306
+ 119, 119, 119, 46, 121, 97, 108, 101,
307
+ 46, 101, 100, 117, 47, 116, 112, 47,
308
+ 99, 97, 115, 34, 39, 62, 32, 60,
309
+ 9, 13, 99, 97, 115, 58, 97, 117,
310
+ 116, 104, 101, 110, 116, 105, 99, 97,
311
+ 116, 105, 111, 110, 70, 83, 97, 105,
312
+ 108, 117, 114, 101, 32, 99, 111, 100,
313
+ 101, 61, 34, 39, 34, 39, 95, 65,
314
+ 90, 62, 38, 60, 93, 47, 99, 97,
315
+ 115, 58, 97, 117, 116, 104, 101, 110,
316
+ 116, 105, 99, 97, 116, 105, 111, 110,
317
+ 70, 97, 105, 108, 117, 114, 101, 62,
318
+ 32, 60, 9, 13, 47, 99, 97, 115,
319
+ 58, 115, 101, 114, 118, 105, 99, 101,
320
+ 82, 101, 115, 112, 111, 110, 115, 101,
321
+ 62, 38, 60, 93, 38, 60, 62, 93,
322
+ 117, 99, 99, 101, 115, 115, 62, 32,
323
+ 60, 9, 13, 99, 97, 115, 58, 117,
324
+ 115, 101, 114, 62, 38, 60, 93, 47,
325
+ 99, 97, 115, 58, 117, 115, 101, 114,
326
+ 62, 32, 60, 9, 13, 32, 60, 9,
327
+ 13, 47, 99, 99, 97, 115, 58, 97,
328
+ 117, 116, 104, 101, 110, 116, 105, 99,
329
+ 97, 116, 105, 111, 110, 83, 117, 99,
330
+ 99, 101, 115, 115, 62, 32, 60, 9,
331
+ 13, 47, 99, 97, 115, 58, 115, 101,
332
+ 114, 118, 105, 99, 101, 82, 101, 115,
333
+ 112, 111, 110, 115, 101, 62, 97, 115,
334
+ 58, 112, 114, 111, 120, 105, 121, 101,
335
+ 115, 62, 32, 60, 9, 13, 32, 60,
336
+ 9, 13, 99, 97, 115, 58, 112, 114,
337
+ 111, 120, 121, 62, 38, 60, 93, 47,
338
+ 99, 97, 115, 58, 112, 114, 111, 120,
339
+ 121, 62, 32, 60, 9, 13, 32, 60,
340
+ 9, 13, 47, 99, 99, 97, 115, 58,
341
+ 112, 114, 111, 120, 105, 101, 115, 62,
342
+ 32, 60, 9, 13, 47, 38, 60, 93,
343
+ 38, 60, 62, 93, 71, 114, 97, 110,
344
+ 116, 105, 110, 103, 84, 105, 99, 107,
345
+ 101, 116, 62, 45, 60, 48, 57, 65,
346
+ 90, 97, 122, 47, 99, 97, 115, 58,
347
+ 112, 114, 111, 120, 121, 71, 114, 97,
348
+ 110, 116, 105, 110, 103, 84, 105, 99,
349
+ 107, 101, 116, 62, 32, 60, 9, 13,
350
+ 32, 60, 9, 13, 47, 99, 97, 115,
351
+ 58, 112, 114, 111, 120, 105, 38, 60,
352
+ 93, 38, 60, 62, 93, 0
353
+ ]
354
+
355
+ class << self
356
+ attr_accessor :_ticket_validate_single_lengths
357
+ private :_ticket_validate_single_lengths, :_ticket_validate_single_lengths=
358
+ end
359
+ self._ticket_validate_single_lengths = [
360
+ 0, 1, 1, 1, 1, 1, 1, 1,
361
+ 1, 1, 1, 1, 1, 1, 1, 1,
362
+ 1, 1, 1, 1, 1, 1, 1, 1,
363
+ 1, 1, 1, 1, 1, 1, 1, 1,
364
+ 2, 1, 1, 1, 1, 1, 1, 1,
365
+ 1, 1, 1, 1, 1, 1, 1, 1,
366
+ 1, 1, 1, 1, 1, 1, 1, 1,
367
+ 1, 1, 1, 2, 1, 2, 1, 1,
368
+ 1, 1, 1, 1, 1, 1, 1, 1,
369
+ 1, 1, 1, 1, 1, 1, 1, 1,
370
+ 2, 1, 1, 1, 1, 1, 1, 1,
371
+ 1, 1, 1, 1, 1, 2, 3, 1,
372
+ 3, 1, 1, 1, 1, 1, 1, 1,
373
+ 1, 1, 1, 1, 1, 1, 1, 1,
374
+ 1, 1, 1, 1, 1, 1, 1, 1,
375
+ 1, 1, 1, 1, 2, 1, 1, 1,
376
+ 1, 1, 1, 1, 1, 1, 1, 1,
377
+ 1, 1, 1, 1, 1, 1, 1, 1,
378
+ 1, 1, 3, 4, 1, 1, 1, 1,
379
+ 1, 1, 1, 2, 1, 1, 1, 1,
380
+ 1, 1, 1, 1, 1, 3, 1, 1,
381
+ 1, 1, 1, 1, 1, 1, 1, 1,
382
+ 2, 2, 2, 1, 1, 1, 1, 1,
383
+ 1, 1, 1, 1, 1, 1, 1, 1,
384
+ 1, 1, 1, 1, 1, 1, 1, 1,
385
+ 1, 1, 1, 1, 1, 2, 1, 1,
386
+ 1, 1, 1, 1, 1, 1, 1, 1,
387
+ 1, 1, 1, 1, 1, 1, 1, 1,
388
+ 1, 1, 1, 1, 1, 1, 1, 1,
389
+ 1, 1, 2, 1, 1, 1, 2, 2,
390
+ 1, 1, 1, 1, 1, 1, 1, 1,
391
+ 1, 1, 3, 1, 1, 1, 1, 1,
392
+ 1, 1, 1, 1, 1, 1, 2, 2,
393
+ 2, 1, 1, 1, 1, 1, 1, 1,
394
+ 1, 1, 1, 1, 1, 2, 1, 3,
395
+ 4, 1, 1, 1, 1, 1, 1, 1,
396
+ 1, 1, 1, 1, 1, 1, 1, 1,
397
+ 2, 1, 1, 1, 1, 1, 1, 1,
398
+ 1, 1, 1, 1, 1, 1, 1, 1,
399
+ 1, 1, 1, 1, 1, 1, 1, 1,
400
+ 1, 1, 2, 2, 2, 1, 1, 1,
401
+ 1, 1, 1, 1, 1, 3, 4, 0
402
+ ]
403
+
404
+ class << self
405
+ attr_accessor :_ticket_validate_range_lengths
406
+ private :_ticket_validate_range_lengths, :_ticket_validate_range_lengths=
407
+ end
408
+ self._ticket_validate_range_lengths = [
409
+ 0, 0, 0, 0, 0, 0, 0, 0,
410
+ 0, 0, 0, 0, 0, 0, 0, 0,
411
+ 0, 0, 0, 0, 0, 0, 0, 0,
412
+ 0, 0, 0, 0, 0, 0, 0, 0,
413
+ 0, 0, 0, 0, 0, 0, 0, 0,
414
+ 0, 0, 0, 0,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 0,
450
+ 0, 0, 0, 0, 0, 0, 0, 0
451
+ ]
452
+
453
+ class << self
454
+ attr_accessor :_ticket_validate_index_offsets
455
+ private :_ticket_validate_index_offsets, :_ticket_validate_index_offsets=
456
+ end
457
+ self._ticket_validate_index_offsets = [
458
+ 0, 0, 2, 4, 6, 8, 10, 12,
459
+ 14, 16, 18, 20, 22, 24, 26, 28,
460
+ 30, 32, 34, 36, 38, 40, 42, 44,
461
+ 46, 48, 50, 52, 54, 56, 58, 60,
462
+ 62, 65, 67, 69, 71, 73, 75, 77,
463
+ 79, 81, 83, 85, 87, 89, 91, 93,
464
+ 95, 97, 99, 101, 103, 105, 107, 109,
465
+ 111, 113, 115, 117, 120, 122, 126, 128,
466
+ 130, 132, 134, 136, 138, 140, 142, 144,
467
+ 146, 148, 150, 152, 154, 156, 158, 160,
468
+ 162, 165, 167, 169, 171, 173, 175, 177,
469
+ 179, 181, 183, 185, 187, 189, 192, 197,
470
+ 199, 203, 205, 207, 209, 211, 213, 215,
471
+ 217, 219, 221, 223, 225, 227, 229, 231,
472
+ 233, 235, 237, 239, 241, 243, 245, 247,
473
+ 249, 251, 253, 255, 257, 261, 263, 265,
474
+ 267, 269, 271, 273, 275, 277, 279, 281,
475
+ 283, 285, 287, 289, 291, 293, 295, 297,
476
+ 299, 301, 303, 307, 312, 314, 316, 318,
477
+ 320, 322, 324, 326, 330, 332, 334, 336,
478
+ 338, 340, 342, 344, 346, 348, 352, 354,
479
+ 356, 358, 360, 362, 364, 366, 368, 370,
480
+ 372, 376, 380, 383, 385, 387, 389, 391,
481
+ 393, 395, 397, 399, 401, 403, 405, 407,
482
+ 409, 411, 413, 415, 417, 419, 421, 423,
483
+ 425, 427, 429, 431, 433, 435, 439, 441,
484
+ 443, 445, 447, 449, 451, 453, 455, 457,
485
+ 459, 461, 463, 465, 467, 469, 471, 473,
486
+ 475, 477, 479, 481, 483, 485, 487, 489,
487
+ 491, 493, 495, 498, 500, 502, 504, 508,
488
+ 512, 514, 516, 518, 520, 522, 524, 526,
489
+ 528, 530, 532, 536, 538, 540, 542, 544,
490
+ 546, 548, 550, 552, 554, 556, 558, 562,
491
+ 566, 569, 571, 573, 575, 577, 579, 581,
492
+ 583, 585, 587, 589, 591, 593, 597, 599,
493
+ 603, 608, 610, 612, 614, 616, 618, 620,
494
+ 622, 624, 626, 628, 630, 632, 634, 636,
495
+ 638, 644, 646, 648, 650, 652, 654, 656,
496
+ 658, 660, 662, 664, 666, 668, 670, 672,
497
+ 674, 676, 678, 680, 682, 684, 686, 688,
498
+ 690, 692, 694, 698, 702, 705, 707, 709,
499
+ 711, 713, 715, 717, 719, 721, 725, 730
500
+ ]
501
+
502
+ class << self
503
+ attr_accessor :_ticket_validate_trans_targs
504
+ private :_ticket_validate_trans_targs, :_ticket_validate_trans_targs=
505
+ end
506
+ self._ticket_validate_trans_targs = [
507
+ 2, 0, 3, 0, 4, 0, 5, 0,
508
+ 6, 0, 7, 0, 8, 0, 9, 0,
509
+ 10, 0, 11, 0, 12, 0, 13, 0,
510
+ 14, 0, 15, 0, 16, 0, 17, 0,
511
+ 18, 0, 19, 0, 20, 0, 21, 0,
512
+ 22, 0, 23, 0, 24, 0, 25, 0,
513
+ 26, 0, 27, 0, 28, 0, 29, 0,
514
+ 30, 0, 31, 0, 32, 0, 33, 33,
515
+ 0, 34, 0, 35, 0, 36, 0, 37,
516
+ 0, 38, 0, 39, 0, 40, 0, 41,
517
+ 0, 42, 0, 43, 0, 44, 0, 45,
518
+ 0, 46, 0, 47, 0, 48, 0, 49,
519
+ 0, 50, 0, 51, 0, 52, 0, 53,
520
+ 0, 54, 0, 55, 0, 56, 0, 57,
521
+ 0, 58, 0, 59, 0, 60, 60, 0,
522
+ 61, 0, 61, 62, 61, 0, 63, 0,
523
+ 64, 0, 65, 0, 66, 0, 67, 0,
524
+ 68, 0, 69, 0, 70, 0, 71, 0,
525
+ 72, 0, 73, 0, 74, 0, 75, 0,
526
+ 76, 0, 77, 0, 78, 0, 79, 0,
527
+ 80, 0, 81, 148, 0, 82, 0, 83,
528
+ 0, 84, 0, 85, 0, 86, 0, 87,
529
+ 0, 88, 0, 89, 0, 90, 0, 91,
530
+ 0, 92, 0, 93, 0, 94, 94, 0,
531
+ 95, 95, 94, 94, 0, 96, 0, 0,
532
+ 97, 146, 96, 98, 0, 99, 0, 100,
533
+ 0, 101, 0, 102, 0, 103, 0, 104,
534
+ 0, 105, 0, 106, 0, 107, 0, 108,
535
+ 0, 109, 0, 110, 0, 111, 0, 112,
536
+ 0, 113, 0, 114, 0, 115, 0, 116,
537
+ 0, 117, 0, 118, 0, 119, 0, 120,
538
+ 0, 121, 0, 122, 0, 123, 0, 124,
539
+ 0, 124, 125, 124, 0, 126, 0, 127,
540
+ 0, 128, 0, 129, 0, 130, 0, 131,
541
+ 0, 132, 0, 133, 0, 134, 0, 135,
542
+ 0, 136, 0, 137, 0, 138, 0, 139,
543
+ 0, 140, 0, 141, 0, 142, 0, 143,
544
+ 0, 144, 0, 145, 0, 335, 0, 0,
545
+ 97, 147, 96, 0, 97, 0, 147, 96,
546
+ 149, 0, 150, 0, 151, 0, 152, 0,
547
+ 153, 0, 154, 0, 155, 0, 155, 156,
548
+ 155, 0, 157, 0, 158, 0, 159, 0,
549
+ 160, 0, 161, 0, 162, 0, 163, 0,
550
+ 164, 0, 165, 0, 0, 166, 333, 165,
551
+ 167, 0, 168, 0, 169, 0, 170, 0,
552
+ 171, 0, 172, 0, 173, 0, 174, 0,
553
+ 175, 0, 176, 0, 177, 178, 177, 0,
554
+ 177, 178, 177, 0, 179, 227, 0, 180,
555
+ 0, 181, 0, 182, 0, 183, 0, 184,
556
+ 0, 185, 0, 186, 0, 187, 0, 188,
557
+ 0, 189, 0, 190, 0, 191, 0, 192,
558
+ 0, 193, 0, 194, 0, 195, 0, 196,
559
+ 0, 197, 0, 198, 0, 199, 0, 200,
560
+ 0, 201, 0, 202, 0, 203, 0, 204,
561
+ 0, 205, 0, 205, 206, 205, 0, 207,
562
+ 0, 208, 0, 209, 0, 210, 0, 211,
563
+ 0, 212, 0, 213, 0, 214, 0, 215,
564
+ 0, 216, 0, 217, 0, 218, 0, 219,
565
+ 0, 220, 0, 221, 0, 222, 0, 223,
566
+ 0, 224, 0, 225, 0, 226, 0, 335,
567
+ 0, 228, 0, 229, 0, 230, 0, 231,
568
+ 0, 232, 0, 233, 0, 234, 0, 235,
569
+ 281, 0, 236, 0, 237, 0, 238, 0,
570
+ 239, 264, 239, 0, 239, 240, 239, 0,
571
+ 241, 0, 242, 0, 243, 0, 244, 0,
572
+ 245, 0, 246, 0, 247, 0, 248, 0,
573
+ 249, 0, 250, 0, 0, 251, 279, 250,
574
+ 252, 0, 253, 0, 254, 0, 255, 0,
575
+ 256, 0, 257, 0, 258, 0, 259, 0,
576
+ 260, 0, 261, 0, 262, 0, 263, 264,
577
+ 263, 0, 263, 264, 263, 0, 265, 241,
578
+ 0, 266, 0, 267, 0, 268, 0, 269,
579
+ 0, 270, 0, 271, 0, 272, 0, 273,
580
+ 0, 274, 0, 275, 0, 276, 0, 277,
581
+ 0, 277, 278, 277, 0, 179, 0, 0,
582
+ 251, 280, 250, 0, 251, 0, 280, 250,
583
+ 282, 0, 283, 0, 284, 0, 285, 0,
584
+ 286, 0, 287, 0, 288, 0, 289, 0,
585
+ 290, 0, 291, 0, 292, 0, 293, 0,
586
+ 294, 0, 295, 0, 296, 0, 296, 297,
587
+ 296, 296, 296, 0, 298, 0, 299, 0,
588
+ 300, 0, 301, 0, 302, 0, 303, 0,
589
+ 304, 0, 305, 0, 306, 0, 307, 0,
590
+ 308, 0, 309, 0, 310, 0, 311, 0,
591
+ 312, 0, 313, 0, 314, 0, 315, 0,
592
+ 316, 0, 317, 0, 318, 0, 319, 0,
593
+ 320, 0, 321, 0, 322, 0, 323, 324,
594
+ 323, 0, 323, 324, 323, 0, 179, 325,
595
+ 0, 326, 0, 327, 0, 328, 0, 329,
596
+ 0, 330, 0, 331, 0, 332, 0, 235,
597
+ 0, 0, 166, 334, 165, 0, 166, 0,
598
+ 334, 165, 0, 0
599
+ ]
600
+
601
+ class << self
602
+ attr_accessor :_ticket_validate_trans_actions
603
+ private :_ticket_validate_trans_actions, :_ticket_validate_trans_actions=
604
+ end
605
+ self._ticket_validate_trans_actions = [
606
+ 0, 0, 0, 0, 0, 0, 0, 0,
607
+ 0, 0, 0, 0, 0, 0, 0, 0,
608
+ 0, 0, 0, 0, 0, 0, 0, 0,
609
+ 0, 0, 0, 0, 0, 0, 0, 0,
610
+ 0, 0, 0, 0, 0, 0, 0, 0,
611
+ 0, 0, 0, 0, 0, 0, 0, 0,
612
+ 0, 0, 0, 0, 0, 0, 0, 0,
613
+ 0, 0, 0, 0, 0, 0, 0, 0,
614
+ 0, 0, 0, 0, 0, 0, 0, 0,
615
+ 0, 0, 0, 0, 0, 0, 0, 0,
616
+ 0, 0, 0, 0, 0, 0, 0, 0,
617
+ 0, 0, 0, 0, 0, 0, 0, 0,
618
+ 0, 0, 0, 0, 0, 0, 0, 0,
619
+ 0, 0, 0, 0, 0, 0, 0, 0,
620
+ 0, 0, 0, 0, 0, 0, 0, 0,
621
+ 0, 0, 0, 0, 0, 0, 0, 0,
622
+ 0, 0, 0, 0, 0, 0, 0, 0,
623
+ 0, 0, 0, 0, 0, 0, 0, 0,
624
+ 0, 0, 0, 0, 0, 0, 0, 0,
625
+ 0, 0, 0, 0, 0, 0, 0, 0,
626
+ 0, 0, 0, 0, 0, 0, 0, 0,
627
+ 0, 0, 0, 0, 0, 0, 0, 0,
628
+ 0, 0, 0, 0, 0, 0, 0, 0,
629
+ 0, 0, 0, 0, 0, 0, 0, 0,
630
+ 3, 3, 13, 13, 0, 0, 0, 0,
631
+ 5, 13, 13, 0, 0, 0, 0, 0,
632
+ 0, 0, 0, 0, 0, 0, 0, 0,
633
+ 0, 0, 0, 0, 0, 0, 0, 0,
634
+ 0, 0, 0, 0, 0, 0, 0, 0,
635
+ 0, 0, 0, 0, 0, 0, 0, 0,
636
+ 0, 0, 0, 0, 0, 0, 0,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0, 0, 0, 0, 0, 0, 13, 13,
673
+ 0, 0, 0, 0, 0, 0, 0, 0,
674
+ 0, 0, 0, 0, 0, 0, 0, 0,
675
+ 0, 0, 0, 0, 0, 0, 9, 9,
676
+ 9, 0, 0, 0, 0, 0, 0, 0,
677
+ 0, 0, 0, 0, 0, 0, 0, 0,
678
+ 0, 0, 0, 0, 0, 0, 0, 0,
679
+ 0, 0, 0, 0, 0, 0, 0, 0,
680
+ 0, 0, 0, 0, 0, 0, 0, 0,
681
+ 0, 13, 13, 0, 0, 0, 13, 13,
682
+ 0, 0, 0, 0, 0, 0, 0, 0,
683
+ 0, 0, 0, 0, 0, 0, 0, 0,
684
+ 0, 0, 0, 0, 0, 0, 0, 0,
685
+ 0, 0, 0, 0, 0, 0, 13, 0,
686
+ 13, 13, 13, 0, 0, 0, 0, 0,
687
+ 0, 0, 0, 0, 0, 0, 0, 0,
688
+ 0, 0, 0, 0, 0, 0, 0, 0,
689
+ 0, 0, 0, 0, 0, 0, 0, 0,
690
+ 0, 0, 0, 0, 0, 0, 0, 0,
691
+ 0, 0, 0, 0, 0, 0, 0, 0,
692
+ 0, 0, 0, 0, 0, 0, 7, 7,
693
+ 7, 0, 0, 0, 0, 0, 0, 0,
694
+ 0, 0, 0, 0, 0, 0, 0, 0,
695
+ 0, 0, 0, 0, 0, 0, 0, 0,
696
+ 0, 0, 0, 13, 13, 0, 0, 0,
697
+ 13, 13, 0, 0
698
+ ]
699
+
700
+ class << self
701
+ attr_accessor :ticket_validate_start
702
+ end
703
+ self.ticket_validate_start = 1;
704
+ class << self
705
+ attr_accessor :ticket_validate_first_final
706
+ end
707
+ self.ticket_validate_first_final = 335;
708
+ class << self
709
+ attr_accessor :ticket_validate_error
710
+ end
711
+ self.ticket_validate_error = 0;
712
+
713
+ class << self
714
+ attr_accessor :ticket_validate_en_main
715
+ end
716
+ self.ticket_validate_en_main = 1;
717
+
718
+
719
+ end
720
+ end