stytch 10.41.0 → 10.42.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/lib/stytch/fraud.rb +56 -1
- data/lib/stytch/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9ec5299338703e2955b430042eb3abf11dca6474be1478e91faca5ecc5b7196
|
|
4
|
+
data.tar.gz: eaa3ad45194052e3a5a1734b5192d670ec04302b7b5194ec8a2128553ca4e8b0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f48a0d7fcc636ca833de1895bc5f0594a9d8559196a0b4a7b0992b67465e75578aacace17be36a908fa6fd417d84a29a07f00cdafa13472ee43301b03321437d
|
|
7
|
+
data.tar.gz: da2f334d10213ff40aedaa934215e2b2c2cae6d2e9931db4c01f3ac8fa54a1ce10e40560d12eaacaa2ca162b632bc58fc494ef846c03e8207d95136094b843e2
|
data/lib/stytch/fraud.rb
CHANGED
|
@@ -11,7 +11,7 @@ require_relative 'request_helper'
|
|
|
11
11
|
module Stytch
|
|
12
12
|
class Fraud
|
|
13
13
|
include Stytch::RequestHelper
|
|
14
|
-
attr_reader :fingerprint, :rules, :verdict_reasons
|
|
14
|
+
attr_reader :fingerprint, :rules, :verdict_reasons, :email
|
|
15
15
|
|
|
16
16
|
def initialize(connection)
|
|
17
17
|
@connection = connection
|
|
@@ -19,6 +19,7 @@ module Stytch
|
|
|
19
19
|
@fingerprint = Stytch::Fraud::Fingerprint.new(@connection)
|
|
20
20
|
@rules = Stytch::Fraud::Rules.new(@connection)
|
|
21
21
|
@verdict_reasons = Stytch::Fraud::VerdictReasons.new(@connection)
|
|
22
|
+
@email = Stytch::Fraud::Email.new(@connection)
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
class Fingerprint
|
|
@@ -336,5 +337,59 @@ module Stytch
|
|
|
336
337
|
post_request('/v1/verdict_reasons/list', request, headers)
|
|
337
338
|
end
|
|
338
339
|
end
|
|
340
|
+
|
|
341
|
+
class Email
|
|
342
|
+
include Stytch::RequestHelper
|
|
343
|
+
|
|
344
|
+
def initialize(connection)
|
|
345
|
+
@connection = connection
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
# Get risk information for a specific email address.
|
|
349
|
+
# The response will contain a recommended action (`ALLOW`, `BLOCK`, or `CHALLENGE`) and a more granular `risk_score`.
|
|
350
|
+
# You can also check the `address_information` and `domain_information` fields for more information about the email address and email domain.
|
|
351
|
+
#
|
|
352
|
+
# This feature is in beta. Reach out to us [here](mailto:fraud-team@stytch.com?subject=Email_Intelligence_Early_Access) if you'd like to request early access.
|
|
353
|
+
#
|
|
354
|
+
# == Parameters:
|
|
355
|
+
# email_address::
|
|
356
|
+
# The email address to check.
|
|
357
|
+
# The type of this field is +String+.
|
|
358
|
+
#
|
|
359
|
+
# == Returns:
|
|
360
|
+
# An object with the following fields:
|
|
361
|
+
# request_id::
|
|
362
|
+
# Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we may ask for this value to help identify a specific API call when helping you debug an issue.
|
|
363
|
+
# The type of this field is +String+.
|
|
364
|
+
# address_information::
|
|
365
|
+
# Information about the email address.
|
|
366
|
+
# The type of this field is +AddressInformation+ (+object+).
|
|
367
|
+
# domain_information::
|
|
368
|
+
# Information about the email domain.
|
|
369
|
+
# The type of this field is +DomainInformation+ (+object+).
|
|
370
|
+
# action::
|
|
371
|
+
# The suggested action based on the attributes of the email address. The available actions are:
|
|
372
|
+
# * `ALLOW` - This email is most likely safe to send to and not fraudulent.
|
|
373
|
+
# * `BLOCK` - This email is invalid or exhibits signs of fraud. We recommend blocking the end user.
|
|
374
|
+
# * `CHALLENGE` - This email has some potentially fraudulent attributes. We recommend increased friction such as 2FA or other forms of extended user verification before allowing the privileged action to proceed.
|
|
375
|
+
#
|
|
376
|
+
# The type of this field is +RiskResponseAction+ (string enum).
|
|
377
|
+
# risk_score::
|
|
378
|
+
# A score from 0 to 100 indicating how risky the email is. 100 is the most risky.
|
|
379
|
+
# The type of this field is +Integer+.
|
|
380
|
+
# status_code::
|
|
381
|
+
# The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
|
|
382
|
+
# The type of this field is +Integer+.
|
|
383
|
+
def risk(
|
|
384
|
+
email_address:
|
|
385
|
+
)
|
|
386
|
+
headers = {}
|
|
387
|
+
request = {
|
|
388
|
+
email_address: email_address
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
post_request('/v1/email/risk', request, headers)
|
|
392
|
+
end
|
|
393
|
+
end
|
|
339
394
|
end
|
|
340
395
|
end
|
data/lib/stytch/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: stytch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.
|
|
4
|
+
version: 10.42.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- stytch
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-01-
|
|
11
|
+
date: 2026-01-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|