yoti 1.8.0 → 1.9.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 +0 -1
- data/lib/yoti.rb +2 -0
- data/lib/yoti/doc_scan/constants.rb +1 -0
- data/lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb +44 -2
- data/lib/yoti/doc_scan/session/create/requested_face_match_check.rb +2 -2
- data/lib/yoti/doc_scan/session/create/requested_id_document_comparison_check.rb +53 -0
- data/lib/yoti/doc_scan/session/create/session_specification.rb +21 -3
- data/lib/yoti/doc_scan/session/retrieve/get_session_result.rb +14 -0
- data/lib/yoti/doc_scan/session/retrieve/id_document_comparison_check_response.rb +12 -0
- data/lib/yoti/version.rb +1 -1
- data/yoti.gemspec +1 -0
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62813310617665f67200974ba737f52d7c9bd2c1b139657b5ec672253ab3d133
|
4
|
+
data.tar.gz: 474d9dff07562499e19ec35d261dadbc056dbe7818bf35620ba7247ea7169569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c9c3ddc325973e5da3598c289428f01ccb7964ef7faed15b56faa7d9067b5f34f20a2b3336e1b357fb388898810595ccdc1bc2b2665213c44513b9ef493cf90
|
7
|
+
data.tar.gz: eb86020139c4e892f289f70a5eb9dfa15b8f2daee955d67ff16a3d93e6eab57e2847eac54f57545b9430b6c6373185fdf485c6fe726831d63b24c5e982b4931c
|
data/README.md
CHANGED
@@ -129,7 +129,6 @@ heroku config:add YOTI_KEY ="$(cat your-access-security.pem)"
|
|
129
129
|
The Yoti SDK can be used for the following products, follow the links for more information about each:
|
130
130
|
1) [Yoti app integration](/docs/PROFILE.md) - Connect with already-verified customers.
|
131
131
|
1) [Yoti Doc Scan](/docs/DOCSCAN.md) - Identity verification embedded in your website or app.
|
132
|
-
1) [Yoti AML](/docs/AML.md) - Anti-Money Laundering check service to allow a deeper KYC process, preventing fraud
|
133
132
|
|
134
133
|
## Support
|
135
134
|
|
data/lib/yoti.rb
CHANGED
@@ -56,6 +56,7 @@ require_relative 'yoti/doc_scan/errors'
|
|
56
56
|
require_relative 'yoti/doc_scan/session/create/create_session_result'
|
57
57
|
require_relative 'yoti/doc_scan/session/create/requested_check'
|
58
58
|
require_relative 'yoti/doc_scan/session/create/requested_document_authenticity_check'
|
59
|
+
require_relative 'yoti/doc_scan/session/create/requested_id_document_comparison_check'
|
59
60
|
require_relative 'yoti/doc_scan/session/create/requested_face_match_check'
|
60
61
|
require_relative 'yoti/doc_scan/session/create/requested_liveness_check'
|
61
62
|
require_relative 'yoti/doc_scan/session/create/requested_task'
|
@@ -72,6 +73,7 @@ require_relative 'yoti/doc_scan/session/create/session_specification'
|
|
72
73
|
require_relative 'yoti/doc_scan/session/retrieve/check_response'
|
73
74
|
require_relative 'yoti/doc_scan/session/retrieve/resource_response'
|
74
75
|
require_relative 'yoti/doc_scan/session/retrieve/authenticity_check_response'
|
76
|
+
require_relative 'yoti/doc_scan/session/retrieve/id_document_comparison_check_response'
|
75
77
|
require_relative 'yoti/doc_scan/session/retrieve/breakdown_response'
|
76
78
|
require_relative 'yoti/doc_scan/session/retrieve/details_response'
|
77
79
|
require_relative 'yoti/doc_scan/session/retrieve/document_fields_response'
|
@@ -4,6 +4,7 @@ module Yoti
|
|
4
4
|
module DocScan
|
5
5
|
class Constants
|
6
6
|
ID_DOCUMENT_AUTHENTICITY = 'ID_DOCUMENT_AUTHENTICITY'
|
7
|
+
ID_DOCUMENT_COMPARISON = 'ID_DOCUMENT_COMPARISON'
|
7
8
|
ID_DOCUMENT_TEXT_DATA_CHECK = 'ID_DOCUMENT_TEXT_DATA_CHECK'
|
8
9
|
ID_DOCUMENT_FACE_MATCH = 'ID_DOCUMENT_FACE_MATCH'
|
9
10
|
LIVENESS = 'LIVENESS'
|
@@ -30,8 +30,18 @@ module Yoti
|
|
30
30
|
# The configuration applied when creating a {RequestedDocumentAuthenticityCheck}
|
31
31
|
#
|
32
32
|
class RequestedDocumentAuthenticityCheckConfig
|
33
|
+
#
|
34
|
+
# @param [String] manual_check
|
35
|
+
#
|
36
|
+
def initialize(manual_check)
|
37
|
+
Validation.assert_is_a(String, manual_check, 'manual_check', true)
|
38
|
+
@manual_check = manual_check
|
39
|
+
end
|
40
|
+
|
33
41
|
def as_json(*_args)
|
34
|
-
{
|
42
|
+
{
|
43
|
+
manual_check: @manual_check
|
44
|
+
}.compact
|
35
45
|
end
|
36
46
|
end
|
37
47
|
|
@@ -39,11 +49,43 @@ module Yoti
|
|
39
49
|
# Builder to assist the creation of {RequestedDocumentAuthenticityCheck}
|
40
50
|
#
|
41
51
|
class RequestedDocumentAuthenticityCheckBuilder
|
52
|
+
#
|
53
|
+
# Requires that a manual follow-up check is always performed
|
54
|
+
#
|
55
|
+
# @return [self]
|
56
|
+
#
|
57
|
+
def with_manual_check_always
|
58
|
+
@manual_check = Constants::ALWAYS
|
59
|
+
self
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# Requires that a manual follow-up check is performed only on failed checks,
|
64
|
+
# and those with a low level of confidence
|
65
|
+
#
|
66
|
+
# @return [self]
|
67
|
+
#
|
68
|
+
def with_manual_check_fallback
|
69
|
+
@manual_check = Constants::FALLBACK
|
70
|
+
self
|
71
|
+
end
|
72
|
+
|
73
|
+
#
|
74
|
+
# Requires that only an automated check is performed. No manual follow-up
|
75
|
+
# Check will ever be initiated
|
76
|
+
#
|
77
|
+
# @return [self]
|
78
|
+
#
|
79
|
+
def with_manual_check_never
|
80
|
+
@manual_check = Constants::NEVER
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
42
84
|
#
|
43
85
|
# @return [RequestedDocumentAuthenticityCheck]
|
44
86
|
#
|
45
87
|
def build
|
46
|
-
config = RequestedDocumentAuthenticityCheckConfig.new
|
88
|
+
config = RequestedDocumentAuthenticityCheckConfig.new(@manual_check)
|
47
89
|
RequestedDocumentAuthenticityCheck.new(config)
|
48
90
|
end
|
49
91
|
end
|
@@ -63,7 +63,7 @@ module Yoti
|
|
63
63
|
end
|
64
64
|
|
65
65
|
#
|
66
|
-
# Requires that a manual follow-up check is performed only on failed
|
66
|
+
# Requires that a manual follow-up check is performed only on failed checks,
|
67
67
|
# and those with a low level of confidence
|
68
68
|
#
|
69
69
|
# @return [self]
|
@@ -74,7 +74,7 @@ module Yoti
|
|
74
74
|
end
|
75
75
|
|
76
76
|
#
|
77
|
-
# Requires that only an automated
|
77
|
+
# Requires that only an automated check is performed. No manual follow-up
|
78
78
|
# Check will ever be initiated
|
79
79
|
#
|
80
80
|
# @return [self]
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Yoti
|
4
|
+
module DocScan
|
5
|
+
module Session
|
6
|
+
module Create
|
7
|
+
#
|
8
|
+
# Requests creation of an ID Document Comparison Check
|
9
|
+
#
|
10
|
+
class RequestedIdDocumentComparisonCheck < RequestedCheck
|
11
|
+
def initialize(config)
|
12
|
+
Validation.assert_is_a(
|
13
|
+
RequestedIdDocumentComparisonCheckConfig,
|
14
|
+
config,
|
15
|
+
'config'
|
16
|
+
)
|
17
|
+
|
18
|
+
super(Constants::ID_DOCUMENT_COMPARISON, config)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# @return [RequestedIdDocumentComparisonCheckBuilder]
|
23
|
+
#
|
24
|
+
def self.builder
|
25
|
+
RequestedIdDocumentComparisonCheckBuilder.new
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
#
|
30
|
+
# The configuration applied when creating a {RequestedIdDocumentComparisonCheck}
|
31
|
+
#
|
32
|
+
class RequestedIdDocumentComparisonCheckConfig
|
33
|
+
def as_json(*_args)
|
34
|
+
{}
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
#
|
39
|
+
# Builder to assist the creation of {RequestedIdDocumentComparisonCheck}
|
40
|
+
#
|
41
|
+
class RequestedIdDocumentComparisonCheckBuilder
|
42
|
+
#
|
43
|
+
# @return [RequestedIdDocumentComparisonCheck]
|
44
|
+
#
|
45
|
+
def build
|
46
|
+
config = RequestedIdDocumentComparisonCheckConfig.new
|
47
|
+
RequestedIdDocumentComparisonCheck.new(config)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -14,6 +14,7 @@ module Yoti
|
|
14
14
|
# @param [Array<RequestedTask>] requested_tasks
|
15
15
|
# @param [SdkConfig] sdk_config
|
16
16
|
# @param [Array<RequiredDocument>] required_documents
|
17
|
+
# @param [Boolean] block_biometric_consent
|
17
18
|
#
|
18
19
|
def initialize(
|
19
20
|
client_session_token_ttl,
|
@@ -23,7 +24,8 @@ module Yoti
|
|
23
24
|
requested_checks,
|
24
25
|
requested_tasks,
|
25
26
|
sdk_config,
|
26
|
-
required_documents
|
27
|
+
required_documents,
|
28
|
+
block_biometric_consent = nil
|
27
29
|
)
|
28
30
|
Validation.assert_is_a(Integer, client_session_token_ttl, 'client_session_token_ttl', true)
|
29
31
|
@client_session_token_ttl = client_session_token_ttl
|
@@ -48,6 +50,8 @@ module Yoti
|
|
48
50
|
|
49
51
|
Validation.assert_is_a(Array, required_documents, 'required_documents', true)
|
50
52
|
@required_documents = required_documents
|
53
|
+
|
54
|
+
@block_biometric_consent = block_biometric_consent
|
51
55
|
end
|
52
56
|
|
53
57
|
def to_json(*_args)
|
@@ -63,7 +67,8 @@ module Yoti
|
|
63
67
|
requested_checks: @requested_checks.map(&:as_json),
|
64
68
|
requested_tasks: @requested_tasks.map(&:as_json),
|
65
69
|
sdk_config: @sdk_config,
|
66
|
-
required_documents: @required_documents.map(&:as_json)
|
70
|
+
required_documents: @required_documents.map(&:as_json),
|
71
|
+
block_biometric_consent: @block_biometric_consent
|
67
72
|
}.compact
|
68
73
|
end
|
69
74
|
|
@@ -181,6 +186,18 @@ module Yoti
|
|
181
186
|
self
|
182
187
|
end
|
183
188
|
|
189
|
+
#
|
190
|
+
# Whether or not to block the collection of biometric consent
|
191
|
+
#
|
192
|
+
# @param [Boolean] block_biometric_consent
|
193
|
+
#
|
194
|
+
# @return [self]
|
195
|
+
#
|
196
|
+
def with_block_biometric_consent(block_biometric_consent)
|
197
|
+
@block_biometric_consent = block_biometric_consent
|
198
|
+
self
|
199
|
+
end
|
200
|
+
|
184
201
|
#
|
185
202
|
# @return [SessionSpecification]
|
186
203
|
#
|
@@ -193,7 +210,8 @@ module Yoti
|
|
193
210
|
@requested_checks,
|
194
211
|
@requested_tasks,
|
195
212
|
@sdk_config,
|
196
|
-
@required_documents
|
213
|
+
@required_documents,
|
214
|
+
@block_biometric_consent
|
197
215
|
)
|
198
216
|
end
|
199
217
|
end
|
@@ -26,6 +26,9 @@ module Yoti
|
|
26
26
|
# @return [ResourceContainer]
|
27
27
|
attr_reader :resources
|
28
28
|
|
29
|
+
# @return [DateTime]
|
30
|
+
attr_reader :biometric_consent_timestamp
|
31
|
+
|
29
32
|
#
|
30
33
|
# @param [Hash] response
|
31
34
|
#
|
@@ -53,6 +56,8 @@ module Yoti
|
|
53
56
|
end
|
54
57
|
|
55
58
|
@resources = ResourceContainer.new(response['resources']) unless response['resources'].nil?
|
59
|
+
|
60
|
+
@biometric_consent_timestamp = DateTime.parse(response['biometric_consent']) unless response['biometric_consent'].nil?
|
56
61
|
end
|
57
62
|
|
58
63
|
#
|
@@ -83,6 +88,13 @@ module Yoti
|
|
83
88
|
@checks.select { |check| check.is_a?(LivenessCheckResponse) }
|
84
89
|
end
|
85
90
|
|
91
|
+
#
|
92
|
+
# @return [Array<IdDocumentComparisonCheckResponse>]
|
93
|
+
#
|
94
|
+
def id_document_comparison_checks
|
95
|
+
@checks.select { |check| check.is_a?(IdDocumentComparisonCheckResponse) }
|
96
|
+
end
|
97
|
+
|
86
98
|
private
|
87
99
|
|
88
100
|
#
|
@@ -95,6 +107,8 @@ module Yoti
|
|
95
107
|
case check['type']
|
96
108
|
when Constants::ID_DOCUMENT_AUTHENTICITY
|
97
109
|
AuthenticityCheckResponse.new(check)
|
110
|
+
when Constants::ID_DOCUMENT_COMPARISON
|
111
|
+
IdDocumentComparisonCheckResponse.new(check)
|
98
112
|
when Constants::ID_DOCUMENT_FACE_MATCH
|
99
113
|
FaceMatchCheckResponse.new(check)
|
100
114
|
when Constants::ID_DOCUMENT_TEXT_DATA_CHECK
|
data/lib/yoti/version.rb
CHANGED
data/yoti.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yoti
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- lib/yoti/doc_scan/session/create/requested_check.rb
|
194
194
|
- lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb
|
195
195
|
- lib/yoti/doc_scan/session/create/requested_face_match_check.rb
|
196
|
+
- lib/yoti/doc_scan/session/create/requested_id_document_comparison_check.rb
|
196
197
|
- lib/yoti/doc_scan/session/create/requested_liveness_check.rb
|
197
198
|
- lib/yoti/doc_scan/session/create/requested_task.rb
|
198
199
|
- lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb
|
@@ -213,6 +214,7 @@ files:
|
|
213
214
|
- lib/yoti/doc_scan/session/retrieve/generated_media.rb
|
214
215
|
- lib/yoti/doc_scan/session/retrieve/generated_text_data_check_response.rb
|
215
216
|
- lib/yoti/doc_scan/session/retrieve/get_session_result.rb
|
217
|
+
- lib/yoti/doc_scan/session/retrieve/id_document_comparison_check_response.rb
|
216
218
|
- lib/yoti/doc_scan/session/retrieve/id_document_resource_response.rb
|
217
219
|
- lib/yoti/doc_scan/session/retrieve/liveness_check_response.rb
|
218
220
|
- lib/yoti/doc_scan/session/retrieve/liveness_resource_response.rb
|
@@ -268,7 +270,7 @@ homepage: https://github.com/getyoti/yoti-ruby-sdk
|
|
268
270
|
licenses:
|
269
271
|
- MIT
|
270
272
|
metadata: {}
|
271
|
-
post_install_message:
|
273
|
+
post_install_message:
|
272
274
|
rdoc_options: []
|
273
275
|
require_paths:
|
274
276
|
- lib
|
@@ -284,7 +286,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
284
286
|
version: '0'
|
285
287
|
requirements: []
|
286
288
|
rubygems_version: 3.0.6
|
287
|
-
signing_key:
|
289
|
+
signing_key:
|
288
290
|
specification_version: 4
|
289
291
|
summary: Yoti Ruby SDK for back-end integration.
|
290
292
|
test_files: []
|