fingerly 0.2.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/README.md +493 -239
- data/lib/fingerly/client.rb +332 -12
- data/lib/fingerly/config.rb +31 -13
- data/lib/fingerly/enums.rb +282 -0
- data/lib/fingerly/errors.rb +101 -0
- data/lib/fingerly/models.rb +185 -8
- data/lib/fingerly/proxy.rb +177 -98
- data/lib/fingerly/version.rb +1 -1
- data/lib/fingerly.rb +1 -0
- data/sig/fingerly.rbs +332 -8
- metadata +2 -1
data/sig/fingerly.rbs
CHANGED
|
@@ -30,6 +30,42 @@ module Fingerly
|
|
|
30
30
|
) -> void
|
|
31
31
|
def event_not_found?: () -> bool
|
|
32
32
|
def pending?: () -> bool
|
|
33
|
+
def event_already_consumed?: () -> bool
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class EventAlreadyConsumedError < APIError
|
|
37
|
+
CODE: String
|
|
38
|
+
|
|
39
|
+
attr_reader consumed_at: String?
|
|
40
|
+
|
|
41
|
+
def initialize: (
|
|
42
|
+
status: Integer,
|
|
43
|
+
?code: String?,
|
|
44
|
+
?details: untyped,
|
|
45
|
+
?request_id: String?,
|
|
46
|
+
?retry_after: Integer?,
|
|
47
|
+
?consumed_at: String?
|
|
48
|
+
) -> void
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
class DeviceCheckError < APIError
|
|
52
|
+
NOT_HELD: String
|
|
53
|
+
SPENT: String
|
|
54
|
+
BUSY: String
|
|
55
|
+
CREDENTIAL_UNAVAILABLE: String
|
|
56
|
+
BITS_REQUIRED: String
|
|
57
|
+
APPLE_REJECTED: String
|
|
58
|
+
UNAVAILABLE: String
|
|
59
|
+
|
|
60
|
+
attr_reader apple_status: Integer?
|
|
61
|
+
|
|
62
|
+
def not_held?: () -> bool
|
|
63
|
+
def spent?: () -> bool
|
|
64
|
+
def busy?: () -> bool
|
|
65
|
+
def credential_unavailable?: () -> bool
|
|
66
|
+
def bits_required?: () -> bool
|
|
67
|
+
def apple_rejected?: () -> bool
|
|
68
|
+
def unavailable?: () -> bool
|
|
33
69
|
end
|
|
34
70
|
|
|
35
71
|
class TimeoutError < Error
|
|
@@ -38,8 +74,215 @@ module Fingerly
|
|
|
38
74
|
class ConnectionError < Error
|
|
39
75
|
end
|
|
40
76
|
|
|
77
|
+
module Signal
|
|
78
|
+
HIGH_ACTIVITY: String
|
|
79
|
+
TAMPERING: String
|
|
80
|
+
DEVICE_FARM: String
|
|
81
|
+
DEVELOPER_TOOLS: String
|
|
82
|
+
GEO_MISMATCH: String
|
|
83
|
+
DEVICE_INCONSISTENT: String
|
|
84
|
+
TOR: String
|
|
85
|
+
PROXY: String
|
|
86
|
+
RESIDENTIAL_PROXY: String
|
|
87
|
+
RESIDENTIAL_PROXY_LOW_CONFIDENCE: String
|
|
88
|
+
RESIDENTIAL_PROXY_MEDIUM_CONFIDENCE: String
|
|
89
|
+
RESIDENTIAL_PROXY_HIGH_CONFIDENCE: String
|
|
90
|
+
VPN_PUBLIC: String
|
|
91
|
+
VPN_TIMEZONE: String
|
|
92
|
+
VPN_RELAY: String
|
|
93
|
+
VPN_MOBILE: String
|
|
94
|
+
VPN_OS_MISMATCH: String
|
|
95
|
+
VPN_LOW_CONFIDENCE: String
|
|
96
|
+
VPN_MEDIUM_CONFIDENCE: String
|
|
97
|
+
VPN_HIGH_CONFIDENCE: String
|
|
98
|
+
IP_BLOCKLIST_EMAIL_SPAM: String
|
|
99
|
+
IP_BLOCKLIST_ATTACK_SOURCE: String
|
|
100
|
+
IP_ABUSER: String
|
|
101
|
+
DATACENTER_IP: String
|
|
102
|
+
BOGON_IP: String
|
|
103
|
+
ANYCAST_IP: String
|
|
104
|
+
INCOGNITO: String
|
|
105
|
+
BAD_BOT: String
|
|
106
|
+
AUTOMATION: String
|
|
107
|
+
FETCH_METADATA_MISSING: String
|
|
108
|
+
WEB_TICKET_MISSING: String
|
|
109
|
+
WEB_TICKET_INVALID: String
|
|
110
|
+
ANTIDETECT_BROWSER: String
|
|
111
|
+
VIRTUAL_MACHINE: String
|
|
112
|
+
FINGERPRINT_SUPPRESSED: String
|
|
113
|
+
PRIVACY_SETTINGS: String
|
|
114
|
+
EMBEDDED_WEB_VIEW: String
|
|
115
|
+
REMOTE_CONTROL: String
|
|
116
|
+
EMULATOR: String
|
|
117
|
+
ROOT_APPS: String
|
|
118
|
+
APP_CLONER: String
|
|
119
|
+
JAILBREAK: String
|
|
120
|
+
SIMULATOR: String
|
|
121
|
+
FRIDA: String
|
|
122
|
+
MITM_ATTACK: String
|
|
123
|
+
ACTIVE_CALL: String
|
|
124
|
+
ATTESTATION_MISSING: String
|
|
125
|
+
ATTESTATION_DOWNGRADE: String
|
|
126
|
+
REPEATED_REINSTALL: String
|
|
127
|
+
DEVICE_ACTIVITY_HIGH: String
|
|
128
|
+
DEVICE_ACTIVITY_VERY_HIGH: String
|
|
129
|
+
PLAY_DEVICE_INTEGRITY_FAILED: String
|
|
130
|
+
PLAY_APP_UNRECOGNIZED: String
|
|
131
|
+
ATTESTATION_FAILED: String
|
|
132
|
+
REPORT_INCOMPLETE: String
|
|
133
|
+
PROBE_ERRORS: String
|
|
134
|
+
CUSTOM_ROOT_CA: String
|
|
135
|
+
SECONDARY_USER_PROFILE: String
|
|
136
|
+
DATACENTER_PROXY: String
|
|
137
|
+
VPN: String
|
|
138
|
+
IP_BLOCKLIST: String
|
|
139
|
+
IP_REPUTATION: String
|
|
140
|
+
NETWORK_ANOMALY: String
|
|
141
|
+
LOCATION_SPOOFING: String
|
|
142
|
+
IOS_SIMULATOR: String
|
|
143
|
+
ANDROID_EMULATOR: String
|
|
144
|
+
JAILBROKEN_DEVICE: String
|
|
145
|
+
ROOTED_DEVICE: String
|
|
146
|
+
CLONED_APP: String
|
|
147
|
+
FRIDA_DETECTED: String
|
|
148
|
+
BROWSER_TAMPERING: String
|
|
149
|
+
BOT: String
|
|
150
|
+
INCOGNITO_MODE: String
|
|
151
|
+
ALL: Array[String]
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
module SuspectLevel
|
|
155
|
+
LOW: String
|
|
156
|
+
MEDIUM: String
|
|
157
|
+
HIGH: String
|
|
158
|
+
ALL: Array[String]
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
module Confidence
|
|
162
|
+
LOW: String
|
|
163
|
+
MEDIUM: String
|
|
164
|
+
HIGH: String
|
|
165
|
+
ALL: Array[String]
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
module AttestationState
|
|
169
|
+
ATTESTED: String
|
|
170
|
+
NOT_ATTESTED: String
|
|
171
|
+
FAILED: String
|
|
172
|
+
ALL: Array[String]
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
module AttestationStatus
|
|
176
|
+
VERIFIED: String
|
|
177
|
+
INDETERMINATE: String
|
|
178
|
+
INVALID: String
|
|
179
|
+
ABSENT: String
|
|
180
|
+
UNCONFIGURED: String
|
|
181
|
+
ALL: Array[String]
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
module AttestSkippedReason
|
|
185
|
+
NOT_OFFERED: String
|
|
186
|
+
UNSUPPORTED: String
|
|
187
|
+
CHALLENGE_UNAVAILABLE: String
|
|
188
|
+
KEY_ERROR: String
|
|
189
|
+
TIMEOUT: String
|
|
190
|
+
BACKOFF: String
|
|
191
|
+
INSTALL_UNAVAILABLE: String
|
|
192
|
+
ALL: Array[String]
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
module VerifyReason
|
|
196
|
+
OK: String
|
|
197
|
+
NOT_FOUND: String
|
|
198
|
+
TOO_OLD: String
|
|
199
|
+
TAG_MISMATCH: String
|
|
200
|
+
UNIDENTIFIABLE: String
|
|
201
|
+
UNSCORED: String
|
|
202
|
+
ALREADY_CONSUMED: String
|
|
203
|
+
ALL: Array[String]
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
module WebhookEventType
|
|
207
|
+
IDENTIFICATION_COMPLETED: String
|
|
208
|
+
IDENTIFICATION_REFUSED: String
|
|
209
|
+
VISITOR_SUSPECT: String
|
|
210
|
+
BILLING_STATUS_CHANGED: String
|
|
211
|
+
USAGE_DAILY_SETTLED: String
|
|
212
|
+
WEBHOOK_TEST: String
|
|
213
|
+
ALL: Array[String]
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
module WebhookEnvironment
|
|
217
|
+
LIVE: String
|
|
218
|
+
TEST: String
|
|
219
|
+
ALL: Array[String]
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
module EventState
|
|
223
|
+
PENDING: String
|
|
224
|
+
ENRICHED: String
|
|
225
|
+
UNAVAILABLE: String
|
|
226
|
+
ALL: Array[String]
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
module Environment
|
|
230
|
+
PRODUCTION: String
|
|
231
|
+
STAGING: String
|
|
232
|
+
DEVELOPMENT: String
|
|
233
|
+
ALL: Array[String]
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
module Platform
|
|
237
|
+
WEB: String
|
|
238
|
+
ANDROID: String
|
|
239
|
+
IOS: String
|
|
240
|
+
ALL: Array[String]
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
module AnonymityNetwork
|
|
244
|
+
TOR: String
|
|
245
|
+
RELAY: String
|
|
246
|
+
VPN: String
|
|
247
|
+
PROXY: String
|
|
248
|
+
HOSTING: String
|
|
249
|
+
ALL: Array[String]
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
module DeviceKind
|
|
253
|
+
DESKTOP: String
|
|
254
|
+
MOBILE: String
|
|
255
|
+
TABLET: String
|
|
256
|
+
SERVER: String
|
|
257
|
+
ALL: Array[String]
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
module VisitorKind
|
|
261
|
+
HUMAN: String
|
|
262
|
+
AI_BOT: String
|
|
263
|
+
AUTOMATION: String
|
|
264
|
+
SEARCH_CRAWLER: String
|
|
265
|
+
ALL: Array[String]
|
|
266
|
+
end
|
|
267
|
+
|
|
41
268
|
class EventTrigger
|
|
269
|
+
SIGNAL_ATTESTATION_FAILED: String
|
|
270
|
+
SIGNAL_ATTESTATION_MISSING: String
|
|
271
|
+
SIGNAL_ATTESTATION_DOWNGRADE: String
|
|
272
|
+
SIGNAL_DEVICE_INCONSISTENT: String
|
|
273
|
+
SIGNAL_REPORT_INCOMPLETE: String
|
|
274
|
+
SIGNAL_PROBE_ERRORS: String
|
|
275
|
+
SIGNAL_FETCH_METADATA_MISSING: String
|
|
276
|
+
SIGNAL_WEB_TICKET_MISSING: String
|
|
277
|
+
SIGNAL_WEB_TICKET_INVALID: String
|
|
278
|
+
SIGNAL_TAMPERING: String
|
|
279
|
+
SIGNAL_BROWSER_TAMPERING: String
|
|
280
|
+
SIGNAL_CUSTOM_ROOT_CA: String
|
|
281
|
+
SIGNAL_SECONDARY_USER_PROFILE: String
|
|
282
|
+
V3_SIGNALS: Array[String]
|
|
283
|
+
|
|
42
284
|
attr_reader signal: String?
|
|
285
|
+
attr_reader group: String?
|
|
43
286
|
attr_reader weight: Integer
|
|
44
287
|
attr_reader confidence: String?
|
|
45
288
|
|
|
@@ -53,6 +296,7 @@ module Fingerly
|
|
|
53
296
|
attr_reader project_id: String?
|
|
54
297
|
attr_reader visitor_id: String?
|
|
55
298
|
attr_reader state: String?
|
|
299
|
+
attr_reader reason: String?
|
|
56
300
|
attr_reader environment: String?
|
|
57
301
|
attr_reader platform: String?
|
|
58
302
|
attr_reader sdk_platform: String?
|
|
@@ -74,13 +318,13 @@ module Fingerly
|
|
|
74
318
|
attr_reader visitor_kind: String?
|
|
75
319
|
attr_reader suspect_level: String?
|
|
76
320
|
|
|
77
|
-
attr_reader occurred_at: Time
|
|
321
|
+
attr_reader occurred_at: Time?
|
|
78
322
|
attr_reader suspect_score: Integer?
|
|
79
323
|
attr_reader triggers: Array[EventTrigger]
|
|
80
324
|
attr_reader document: Hash[String, untyped]?
|
|
81
325
|
attr_reader raw: Hash[String, untyped]
|
|
82
326
|
|
|
83
|
-
def initialize: (Hash[String, untyped]) -> void
|
|
327
|
+
def initialize: (Hash[String, untyped], ?lenient_time: bool) -> void
|
|
84
328
|
def has_document?: () -> bool
|
|
85
329
|
def scored?: () -> bool
|
|
86
330
|
end
|
|
@@ -98,6 +342,52 @@ module Fingerly
|
|
|
98
342
|
| () -> Enumerator[Event, Array[Event]]
|
|
99
343
|
end
|
|
100
344
|
|
|
345
|
+
class EventConsumption
|
|
346
|
+
attr_reader request_id: String?
|
|
347
|
+
attr_reader consumed_at: String?
|
|
348
|
+
attr_reader first: bool
|
|
349
|
+
attr_reader raw: Hash[String, untyped]
|
|
350
|
+
|
|
351
|
+
def initialize: (Hash[String, untyped]) -> void
|
|
352
|
+
def first?: () -> bool
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
class EventVerification
|
|
356
|
+
NOT_FOUND: String
|
|
357
|
+
TOO_OLD: String
|
|
358
|
+
TAG_MISMATCH: String
|
|
359
|
+
UNIDENTIFIABLE: String
|
|
360
|
+
UNSCORED: String
|
|
361
|
+
ALREADY_CONSUMED: String
|
|
362
|
+
REASONS: Array[String]
|
|
363
|
+
|
|
364
|
+
attr_reader ok: bool
|
|
365
|
+
attr_reader reason: String
|
|
366
|
+
attr_reader event: Event?
|
|
367
|
+
|
|
368
|
+
def initialize: (reason: String, event: Event?) -> void
|
|
369
|
+
def ok?: () -> bool
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
class DeviceCheckBits
|
|
373
|
+
attr_reader found: bool
|
|
374
|
+
attr_reader bit0: bool
|
|
375
|
+
attr_reader bit1: bool
|
|
376
|
+
attr_reader last_update: String?
|
|
377
|
+
attr_reader raw: Hash[String, untyped]
|
|
378
|
+
|
|
379
|
+
def initialize: (Hash[String, untyped]) -> void
|
|
380
|
+
def found?: () -> bool
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
class DeviceCheckWrite
|
|
384
|
+
attr_reader bit0: bool?
|
|
385
|
+
attr_reader bit1: bool?
|
|
386
|
+
attr_reader raw: Hash[String, untyped]
|
|
387
|
+
|
|
388
|
+
def initialize: (Hash[String, untyped]) -> void
|
|
389
|
+
end
|
|
390
|
+
|
|
101
391
|
class WebhookEvent
|
|
102
392
|
attr_reader id: String?
|
|
103
393
|
attr_reader type: String?
|
|
@@ -117,17 +407,33 @@ module Fingerly
|
|
|
117
407
|
USER_AGENT: String
|
|
118
408
|
MAX_ERROR_BODY: Integer
|
|
119
409
|
|
|
410
|
+
DEVICE_CHECK_ATTEMPTS: Integer
|
|
411
|
+
DEVICE_CHECK_BACKOFF: Array[Float]
|
|
412
|
+
DEVICE_CHECK_MAX_WAIT: Integer
|
|
413
|
+
|
|
120
414
|
attr_reader events: Events
|
|
415
|
+
attr_reader device_check: DeviceCheck
|
|
121
416
|
|
|
122
417
|
def initialize: (
|
|
123
418
|
secret_key: String,
|
|
124
419
|
?endpoint: String?,
|
|
125
420
|
?api_version: String,
|
|
126
421
|
?timeout: Numeric,
|
|
127
|
-
?configure_http: (^(untyped) -> void)
|
|
422
|
+
?configure_http: (^(untyped) -> void)?,
|
|
423
|
+
?allow_insecure_loopback: bool
|
|
128
424
|
) -> void
|
|
129
425
|
def close: () -> void
|
|
130
426
|
def get: (String) -> Hash[String, untyped]
|
|
427
|
+
def spend_device_check: (untyped, String, String?) -> Hash[String, untyped]
|
|
428
|
+
def post_consume: (String) -> Hash[String, untyped]
|
|
429
|
+
|
|
430
|
+
def inspect: () -> String
|
|
431
|
+
end
|
|
432
|
+
|
|
433
|
+
class DeviceCheck
|
|
434
|
+
def initialize: (Client) -> void
|
|
435
|
+
def query: (String) -> DeviceCheckBits
|
|
436
|
+
def write: (String, ?bit0: bool?, ?bit1: bool?) -> DeviceCheckWrite
|
|
131
437
|
|
|
132
438
|
def inspect: () -> String
|
|
133
439
|
end
|
|
@@ -143,6 +449,18 @@ module Fingerly
|
|
|
143
449
|
?visitor: String?,
|
|
144
450
|
?level: String?
|
|
145
451
|
) -> EventPage
|
|
452
|
+
DEFAULT_MAX_AGE_SECONDS: Integer
|
|
453
|
+
|
|
454
|
+
def consume: (String) -> EventConsumption
|
|
455
|
+
def verify: (
|
|
456
|
+
String,
|
|
457
|
+
?max_age_seconds: Integer,
|
|
458
|
+
?tag: String?,
|
|
459
|
+
?consume: bool
|
|
460
|
+
) -> EventVerification
|
|
461
|
+
def self.verify_options: (untyped, untyped, untyped) -> void
|
|
462
|
+
def self.failed_check: (Event, Integer, String?) -> String?
|
|
463
|
+
def self.segment: (untyped) -> String
|
|
146
464
|
def self.escape: (untyped) -> String
|
|
147
465
|
def self.instant: (Time) -> String
|
|
148
466
|
|
|
@@ -185,25 +503,31 @@ module Fingerly
|
|
|
185
503
|
DEFAULT_TIMEOUT: Integer
|
|
186
504
|
USER_AGENT: String
|
|
187
505
|
PROXY_VERSION: String
|
|
506
|
+
NO_CLIENT_IP: String
|
|
507
|
+
MISSING_ORIGIN_JSON: String
|
|
508
|
+
ALLOWED_PLATFORMS: Regexp
|
|
509
|
+
FORWARDED_CLIENT_HEADERS: Array[String]
|
|
510
|
+
RELAYABLE_STATUS: Range[Integer]
|
|
188
511
|
BODILESS: Array[Integer]
|
|
189
512
|
RELAYED_HEADERS: Array[String]
|
|
190
513
|
|
|
191
514
|
attr_reader max_body_bytes: Integer
|
|
192
|
-
attr_reader path: String
|
|
515
|
+
attr_reader path: String
|
|
193
516
|
attr_reader api_version: String
|
|
194
517
|
|
|
195
518
|
def initialize: (
|
|
196
519
|
?untyped app,
|
|
197
520
|
client_ip: ^(ProxyRequest) -> String?,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
?
|
|
521
|
+
path: String,
|
|
522
|
+
proxy_key: String,
|
|
523
|
+
?allowed_origins: Array[String]?,
|
|
201
524
|
?api_version: String,
|
|
202
525
|
?upstream: String?,
|
|
203
526
|
?max_body_bytes: Integer,
|
|
204
527
|
?timeout: Numeric,
|
|
205
528
|
?configure_http: (^(untyped) -> void)?,
|
|
206
|
-
?logger: untyped
|
|
529
|
+
?logger: untyped,
|
|
530
|
+
?allow_insecure_loopback: bool
|
|
207
531
|
) -> void
|
|
208
532
|
def handles?: (String) -> bool
|
|
209
533
|
def call: (Hash[String, untyped]) -> [Integer, Hash[String, String], Array[String]]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fingerly
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fingerly
|
|
@@ -24,6 +24,7 @@ files:
|
|
|
24
24
|
- lib/fingerly.rb
|
|
25
25
|
- lib/fingerly/client.rb
|
|
26
26
|
- lib/fingerly/config.rb
|
|
27
|
+
- lib/fingerly/enums.rb
|
|
27
28
|
- lib/fingerly/errors.rb
|
|
28
29
|
- lib/fingerly/models.rb
|
|
29
30
|
- lib/fingerly/proxy.rb
|