yoti 1.6.1 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/ISSUE_TEMPLATE.md +17 -0
- data/.gitignore +1 -0
- data/CONTRIBUTING.md +1 -30
- data/README.md +23 -224
- data/Rakefile +9 -8
- data/lib/yoti.rb +50 -1
- data/lib/yoti/activity_details.rb +1 -0
- data/lib/yoti/client.rb +13 -4
- data/lib/yoti/configuration.rb +7 -2
- data/lib/yoti/data_type/age_verification.rb +1 -1
- data/lib/yoti/data_type/base_profile.rb +1 -1
- data/lib/yoti/data_type/document_details.rb +5 -13
- data/lib/yoti/data_type/image.rb +4 -12
- data/lib/yoti/data_type/image_jpeg.rb +2 -0
- data/lib/yoti/data_type/image_png.rb +2 -0
- data/lib/yoti/data_type/media.rb +19 -0
- data/lib/yoti/doc_scan/client.rb +163 -0
- data/lib/yoti/doc_scan/constants.rb +28 -0
- data/lib/yoti/doc_scan/session/create/create_session_result.rb +50 -0
- data/lib/yoti/doc_scan/session/create/document_filter.rb +31 -0
- data/lib/yoti/doc_scan/session/create/document_restrictions_filter.rb +140 -0
- data/lib/yoti/doc_scan/session/create/notification_config.rb +142 -0
- data/lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb +150 -0
- data/lib/yoti/doc_scan/session/create/requested_check.rb +39 -0
- data/lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb +53 -0
- data/lib/yoti/doc_scan/session/create/requested_face_match_check.rb +95 -0
- data/lib/yoti/doc_scan/session/create/requested_liveness_check.rb +108 -0
- data/lib/yoti/doc_scan/session/create/requested_task.rb +39 -0
- data/lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb +94 -0
- data/lib/yoti/doc_scan/session/create/required_document.rb +31 -0
- data/lib/yoti/doc_scan/session/create/required_id_document.rb +53 -0
- data/lib/yoti/doc_scan/session/create/sdk_config.rb +221 -0
- data/lib/yoti/doc_scan/session/create/session_specification.rb +203 -0
- data/lib/yoti/doc_scan/session/retrieve/authenticity_check_response.rb +12 -0
- data/lib/yoti/doc_scan/session/retrieve/breakdown_response.rb +38 -0
- data/lib/yoti/doc_scan/session/retrieve/check_response.rb +63 -0
- data/lib/yoti/doc_scan/session/retrieve/details_response.rb +28 -0
- data/lib/yoti/doc_scan/session/retrieve/document_fields_response.rb +21 -0
- data/lib/yoti/doc_scan/session/retrieve/face_map_response.rb +21 -0
- data/lib/yoti/doc_scan/session/retrieve/face_match_check_response.rb +12 -0
- data/lib/yoti/doc_scan/session/retrieve/frame_response.rb +21 -0
- data/lib/yoti/doc_scan/session/retrieve/generated_check_response.rb +28 -0
- data/lib/yoti/doc_scan/session/retrieve/generated_media.rb +28 -0
- data/lib/yoti/doc_scan/session/retrieve/generated_text_data_check_response.rb +12 -0
- data/lib/yoti/doc_scan/session/retrieve/get_session_result.rb +113 -0
- data/lib/yoti/doc_scan/session/retrieve/id_document_resource_response.rb +52 -0
- data/lib/yoti/doc_scan/session/retrieve/liveness_check_response.rb +12 -0
- data/lib/yoti/doc_scan/session/retrieve/liveness_resource_response.rb +24 -0
- data/lib/yoti/doc_scan/session/retrieve/media_response.rb +38 -0
- data/lib/yoti/doc_scan/session/retrieve/page_response.rb +27 -0
- data/lib/yoti/doc_scan/session/retrieve/recommendation_response.rb +34 -0
- data/lib/yoti/doc_scan/session/retrieve/report_response.rb +31 -0
- data/lib/yoti/doc_scan/session/retrieve/resource_container.rb +50 -0
- data/lib/yoti/doc_scan/session/retrieve/resource_response.rb +39 -0
- data/lib/yoti/doc_scan/session/retrieve/task_response.rb +87 -0
- data/lib/yoti/doc_scan/session/retrieve/text_data_check_response.rb +12 -0
- data/lib/yoti/doc_scan/session/retrieve/text_extraction_task_response.rb +18 -0
- data/lib/yoti/doc_scan/session/retrieve/zoom_liveness_resource_response.rb +33 -0
- data/lib/yoti/doc_scan/support/supported_documents.rb +60 -0
- data/lib/yoti/dynamic_share_service/extension/thirdparty_attribute_extension.rb +62 -11
- data/lib/yoti/dynamic_share_service/policy/dynamic_policy.rb +17 -17
- data/lib/yoti/dynamic_share_service/share_url.rb +28 -33
- data/lib/yoti/errors.rb +17 -2
- data/lib/yoti/http/aml_check_request.rb +12 -6
- data/lib/yoti/http/payloads/aml_address.rb +4 -0
- data/lib/yoti/http/payloads/aml_profile.rb +7 -1
- data/lib/yoti/http/profile_request.rb +11 -6
- data/lib/yoti/http/request.rb +221 -18
- data/lib/yoti/http/signed_request.rb +13 -4
- data/lib/yoti/protobuf/main.rb +1 -1
- data/lib/yoti/ssl.rb +3 -2
- data/lib/yoti/util/anchor_processor.rb +1 -1
- data/lib/yoti/util/validation.rb +41 -0
- data/lib/yoti/version.rb +1 -1
- data/rubocop.yml +9 -1
- data/yoti.gemspec +5 -8
- metadata +53 -63
- data/lib/yoti/sandbox.rb +0 -5
- data/lib/yoti/sandbox/anchor.rb +0 -49
- data/lib/yoti/sandbox/attribute.rb +0 -52
- data/lib/yoti/sandbox/profile.rb +0 -171
- data/lib/yoti/sandbox/sandbox.rb +0 -105
- data/lib/yoti/sandbox/sandbox_client.rb +0 -45
- data/login_flow.png +0 -0
@@ -3,6 +3,11 @@ require 'base64'
|
|
3
3
|
module Yoti
|
4
4
|
# Converts a basic Net::HTTP request into a Yoti Signed Request
|
5
5
|
class SignedRequest
|
6
|
+
#
|
7
|
+
# @param [Net::HTTPRequest] unsigned_request
|
8
|
+
# @param [String] path
|
9
|
+
# @param [#to_json,String] payload
|
10
|
+
#
|
6
11
|
def initialize(unsigned_request, path, payload = {})
|
7
12
|
@http_req = unsigned_request
|
8
13
|
@path = path
|
@@ -10,6 +15,9 @@ module Yoti
|
|
10
15
|
@auth_key = Yoti::SSL.auth_key_from_pem
|
11
16
|
end
|
12
17
|
|
18
|
+
#
|
19
|
+
# @return [Net::HTTPRequest]
|
20
|
+
#
|
13
21
|
def sign
|
14
22
|
@http_req['X-Yoti-Auth-Digest'] = message_signature
|
15
23
|
@http_req['X-Yoti-SDK'] = Yoti.configuration.sdk_identifier
|
@@ -20,18 +28,19 @@ module Yoti
|
|
20
28
|
private
|
21
29
|
|
22
30
|
def message_signature
|
23
|
-
@message_signature ||= Yoti::SSL.get_secure_signature("#{http_method}&#{@path}#{
|
31
|
+
@message_signature ||= Yoti::SSL.get_secure_signature("#{http_method}&#{@path}#{base64_payload}")
|
24
32
|
end
|
25
33
|
|
26
34
|
def http_method
|
27
35
|
@http_req.method
|
28
36
|
end
|
29
37
|
|
30
|
-
|
31
|
-
def payload_string
|
38
|
+
def base64_payload
|
32
39
|
return '' unless @payload
|
33
40
|
|
34
|
-
|
41
|
+
payload_string = @payload.is_a?(String) ? @payload : @payload.to_json
|
42
|
+
|
43
|
+
'&' + Base64.strict_encode64(payload_string)
|
35
44
|
end
|
36
45
|
end
|
37
46
|
end
|
data/lib/yoti/protobuf/main.rb
CHANGED
@@ -94,7 +94,7 @@ module Yoti
|
|
94
94
|
proto_multi_value = Yoti::Protobuf::Attrpubapi::MultiValue.decode(value)
|
95
95
|
items = []
|
96
96
|
proto_multi_value.values.each do |item|
|
97
|
-
items
|
97
|
+
items << value_based_on_content_type(item.data, item.content_type)
|
98
98
|
end
|
99
99
|
MultiValue.new(items)
|
100
100
|
end
|
data/lib/yoti/ssl.rb
CHANGED
@@ -32,7 +32,7 @@ module Yoti
|
|
32
32
|
end
|
33
33
|
|
34
34
|
# Extracts the public key from pem key, converts it to a DER base 64 encoded value
|
35
|
-
# @return [String] base 64 encoded
|
35
|
+
# @return [String] base 64 encoded authentication key
|
36
36
|
def auth_key_from_pem
|
37
37
|
public_key = private_key.public_key
|
38
38
|
Base64.strict_encode64(public_key.to_der)
|
@@ -48,7 +48,7 @@ module Yoti
|
|
48
48
|
|
49
49
|
# Uses the decrypted receipt key and the current user's iv to decode the text
|
50
50
|
# @param key [String] base 64 decoded key
|
51
|
-
# @param
|
51
|
+
# @param user_iv [String] base 64 decoded iv
|
52
52
|
# @param text [String] base 64 decoded cyphered text
|
53
53
|
# @return [String] base 64 decoded deciphered text
|
54
54
|
def decipher(key, user_iv, text)
|
@@ -60,6 +60,7 @@ module Yoti
|
|
60
60
|
end
|
61
61
|
|
62
62
|
# Reset and reload the Private Key used for SSL functions
|
63
|
+
# @deprecated 2.0.0
|
63
64
|
def reload!
|
64
65
|
@private_key = nil
|
65
66
|
@pem = nil
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Yoti
|
4
|
+
class Validation
|
5
|
+
#
|
6
|
+
# @param value
|
7
|
+
# @param [String] name
|
8
|
+
#
|
9
|
+
def self.assert_not_nil(value, name)
|
10
|
+
return unless value.nil?
|
11
|
+
|
12
|
+
raise(ArgumentError, "#{name} must not be nil")
|
13
|
+
end
|
14
|
+
|
15
|
+
#
|
16
|
+
# @param [Class] type
|
17
|
+
# @param value
|
18
|
+
# @param [String] name
|
19
|
+
# @param [Boolean] nilable
|
20
|
+
#
|
21
|
+
def self.assert_is_a(type, value, name, nilable = false)
|
22
|
+
return if nilable && value.nil?
|
23
|
+
return if value.is_a?(type)
|
24
|
+
|
25
|
+
raise(ArgumentError, "#{name} must be a #{type.name}")
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# @param [Symbol] method
|
30
|
+
# @param value
|
31
|
+
# @param [String] name
|
32
|
+
#
|
33
|
+
def self.assert_respond_to(method, value, name)
|
34
|
+
assert_not_nil(value, name)
|
35
|
+
|
36
|
+
return if value.respond_to?(method)
|
37
|
+
|
38
|
+
raise(ArgumentError, "#{name} must respond to #{method}")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/yoti/version.rb
CHANGED
data/rubocop.yml
CHANGED
@@ -4,6 +4,8 @@ AllCops:
|
|
4
4
|
TargetRubyVersion: 2.4
|
5
5
|
Exclude:
|
6
6
|
- 'examples/rails/config/**/*'
|
7
|
+
- 'examples/doc_scan/config/**/*'
|
8
|
+
- 'examples/doc_scan/bin/**/*'
|
7
9
|
- 'lib/yoti/protobuf/attrpubapi/*'
|
8
10
|
- 'lib/yoti/protobuf/compubapi/*'
|
9
11
|
- 'lib/yoti/protobuf/sharepubapi/*'
|
@@ -26,7 +28,7 @@ Metrics/ClassLength:
|
|
26
28
|
Enabled: false
|
27
29
|
Max: 115
|
28
30
|
|
29
|
-
|
31
|
+
Layout/LineLength:
|
30
32
|
Enabled: false
|
31
33
|
|
32
34
|
Metrics/MethodLength:
|
@@ -55,3 +57,9 @@ Naming/MethodName:
|
|
55
57
|
Naming/PredicateName:
|
56
58
|
Exclude:
|
57
59
|
- lib/yoti/util/age_processor.rb
|
60
|
+
|
61
|
+
Metrics/ParameterLists:
|
62
|
+
Exclude:
|
63
|
+
- lib/yoti/doc_scan/session/create/sdk_config.rb
|
64
|
+
- lib/yoti/doc_scan/session/create/session_specification.rb
|
65
|
+
- spec/yoti/doc_scan/client_spec.rb
|
data/yoti.gemspec
CHANGED
@@ -5,8 +5,8 @@ require 'yoti/version'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'yoti'
|
7
7
|
spec.version = Yoti::VERSION
|
8
|
-
spec.authors = ['
|
9
|
-
spec.email = ['
|
8
|
+
spec.authors = ['Yoti']
|
9
|
+
spec.email = ['websdk@yoti.com']
|
10
10
|
|
11
11
|
spec.summary = 'Yoti Ruby SDK for back-end integration.'
|
12
12
|
spec.description = <<-DESC
|
@@ -18,22 +18,19 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.homepage = 'https://github.com/getyoti/yoti-ruby-sdk'
|
19
19
|
spec.license = 'MIT'
|
20
20
|
|
21
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|examples)/|^sonar-project.properties$|^.dependabot/config.yml$|^.travis.yml$}) }
|
21
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|examples|docs)/|^sonar-project.properties$|^.dependabot/config.yml$|^.travis.yml$}) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
24
|
spec.required_ruby_version = '>= 2.4'
|
25
25
|
|
26
|
-
spec.add_dependency '
|
27
|
-
spec.add_dependency 'google-protobuf', '~> 3.7', '>= 3.7.0'
|
28
|
-
spec.add_dependency 'protobuf', '~> 3.6'
|
26
|
+
spec.add_dependency 'google-protobuf', '~> 3.7'
|
29
27
|
|
30
28
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
31
|
-
spec.add_development_dependency 'coveralls', '~> 0.8'
|
32
29
|
spec.add_development_dependency 'dotenv', '~> 2.2'
|
33
30
|
spec.add_development_dependency 'generator_spec', '~> 0.9'
|
34
31
|
spec.add_development_dependency 'rake', '~> 12.0'
|
35
32
|
spec.add_development_dependency 'rspec', '~> 3.5'
|
36
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
33
|
+
spec.add_development_dependency 'simplecov', '~> 0.17.1'
|
37
34
|
spec.add_development_dependency 'webmock', '~> 3.3'
|
38
35
|
spec.add_development_dependency 'yard', '~> 0.9'
|
39
36
|
spec.add_development_dependency 'yardstick', '~> 0.9'
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Yoti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: activesupport
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '5.0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '5.0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: google-protobuf
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,9 +17,6 @@ dependencies:
|
|
31
17
|
- - "~>"
|
32
18
|
- !ruby/object:Gem::Version
|
33
19
|
version: '3.7'
|
34
|
-
- - ">="
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 3.7.0
|
37
20
|
type: :runtime
|
38
21
|
prerelease: false
|
39
22
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,23 +24,6 @@ dependencies:
|
|
41
24
|
- - "~>"
|
42
25
|
- !ruby/object:Gem::Version
|
43
26
|
version: '3.7'
|
44
|
-
- - ">="
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 3.7.0
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: protobuf
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- - "~>"
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '3.6'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
requirements:
|
58
|
-
- - "~>"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '3.6'
|
61
27
|
- !ruby/object:Gem::Dependency
|
62
28
|
name: bundler
|
63
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,20 +38,6 @@ dependencies:
|
|
72
38
|
- - "~>"
|
73
39
|
- !ruby/object:Gem::Version
|
74
40
|
version: '2.0'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: coveralls
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0.8'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0.8'
|
89
41
|
- !ruby/object:Gem::Dependency
|
90
42
|
name: dotenv
|
91
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,14 +100,14 @@ dependencies:
|
|
148
100
|
requirements:
|
149
101
|
- - "~>"
|
150
102
|
- !ruby/object:Gem::Version
|
151
|
-
version:
|
103
|
+
version: 0.17.1
|
152
104
|
type: :development
|
153
105
|
prerelease: false
|
154
106
|
version_requirements: !ruby/object:Gem::Requirement
|
155
107
|
requirements:
|
156
108
|
- - "~>"
|
157
109
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
110
|
+
version: 0.17.1
|
159
111
|
- !ruby/object:Gem::Dependency
|
160
112
|
name: webmock
|
161
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,11 +155,12 @@ description: |2
|
|
203
155
|
with Yoti, so that your users can share their identity details with your
|
204
156
|
application in a secure and trusted way.
|
205
157
|
email:
|
206
|
-
-
|
158
|
+
- websdk@yoti.com
|
207
159
|
executables: []
|
208
160
|
extensions: []
|
209
161
|
extra_rdoc_files: []
|
210
162
|
files:
|
163
|
+
- ".github/ISSUE_TEMPLATE.md"
|
211
164
|
- ".gitignore"
|
212
165
|
- CONTRIBUTING.md
|
213
166
|
- Gemfile
|
@@ -230,9 +183,53 @@ files:
|
|
230
183
|
- lib/yoti/data_type/image.rb
|
231
184
|
- lib/yoti/data_type/image_jpeg.rb
|
232
185
|
- lib/yoti/data_type/image_png.rb
|
186
|
+
- lib/yoti/data_type/media.rb
|
233
187
|
- lib/yoti/data_type/multi_value.rb
|
234
188
|
- lib/yoti/data_type/profile.rb
|
235
189
|
- lib/yoti/data_type/signed_time_stamp.rb
|
190
|
+
- lib/yoti/doc_scan/client.rb
|
191
|
+
- lib/yoti/doc_scan/constants.rb
|
192
|
+
- lib/yoti/doc_scan/session/create/create_session_result.rb
|
193
|
+
- lib/yoti/doc_scan/session/create/document_filter.rb
|
194
|
+
- lib/yoti/doc_scan/session/create/document_restrictions_filter.rb
|
195
|
+
- lib/yoti/doc_scan/session/create/notification_config.rb
|
196
|
+
- lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb
|
197
|
+
- lib/yoti/doc_scan/session/create/requested_check.rb
|
198
|
+
- lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb
|
199
|
+
- lib/yoti/doc_scan/session/create/requested_face_match_check.rb
|
200
|
+
- lib/yoti/doc_scan/session/create/requested_liveness_check.rb
|
201
|
+
- lib/yoti/doc_scan/session/create/requested_task.rb
|
202
|
+
- lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb
|
203
|
+
- lib/yoti/doc_scan/session/create/required_document.rb
|
204
|
+
- lib/yoti/doc_scan/session/create/required_id_document.rb
|
205
|
+
- lib/yoti/doc_scan/session/create/sdk_config.rb
|
206
|
+
- lib/yoti/doc_scan/session/create/session_specification.rb
|
207
|
+
- lib/yoti/doc_scan/session/retrieve/authenticity_check_response.rb
|
208
|
+
- lib/yoti/doc_scan/session/retrieve/breakdown_response.rb
|
209
|
+
- lib/yoti/doc_scan/session/retrieve/check_response.rb
|
210
|
+
- lib/yoti/doc_scan/session/retrieve/details_response.rb
|
211
|
+
- lib/yoti/doc_scan/session/retrieve/document_fields_response.rb
|
212
|
+
- lib/yoti/doc_scan/session/retrieve/face_map_response.rb
|
213
|
+
- lib/yoti/doc_scan/session/retrieve/face_match_check_response.rb
|
214
|
+
- lib/yoti/doc_scan/session/retrieve/frame_response.rb
|
215
|
+
- lib/yoti/doc_scan/session/retrieve/generated_check_response.rb
|
216
|
+
- lib/yoti/doc_scan/session/retrieve/generated_media.rb
|
217
|
+
- lib/yoti/doc_scan/session/retrieve/generated_text_data_check_response.rb
|
218
|
+
- lib/yoti/doc_scan/session/retrieve/get_session_result.rb
|
219
|
+
- lib/yoti/doc_scan/session/retrieve/id_document_resource_response.rb
|
220
|
+
- lib/yoti/doc_scan/session/retrieve/liveness_check_response.rb
|
221
|
+
- lib/yoti/doc_scan/session/retrieve/liveness_resource_response.rb
|
222
|
+
- lib/yoti/doc_scan/session/retrieve/media_response.rb
|
223
|
+
- lib/yoti/doc_scan/session/retrieve/page_response.rb
|
224
|
+
- lib/yoti/doc_scan/session/retrieve/recommendation_response.rb
|
225
|
+
- lib/yoti/doc_scan/session/retrieve/report_response.rb
|
226
|
+
- lib/yoti/doc_scan/session/retrieve/resource_container.rb
|
227
|
+
- lib/yoti/doc_scan/session/retrieve/resource_response.rb
|
228
|
+
- lib/yoti/doc_scan/session/retrieve/task_response.rb
|
229
|
+
- lib/yoti/doc_scan/session/retrieve/text_data_check_response.rb
|
230
|
+
- lib/yoti/doc_scan/session/retrieve/text_extraction_task_response.rb
|
231
|
+
- lib/yoti/doc_scan/session/retrieve/zoom_liveness_resource_response.rb
|
232
|
+
- lib/yoti/doc_scan/support/supported_documents.rb
|
236
233
|
- lib/yoti/dynamic_share_service/dynamic_scenario.rb
|
237
234
|
- lib/yoti/dynamic_share_service/extension/extension.rb
|
238
235
|
- lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb
|
@@ -261,20 +258,14 @@ files:
|
|
261
258
|
- lib/yoti/protobuf/sharepubapi/ExtraData_pb.rb
|
262
259
|
- lib/yoti/protobuf/sharepubapi/IssuingAttributes_pb.rb
|
263
260
|
- lib/yoti/protobuf/sharepubapi/ThirdPartyAttribute_pb.rb
|
264
|
-
- lib/yoti/sandbox.rb
|
265
|
-
- lib/yoti/sandbox/anchor.rb
|
266
|
-
- lib/yoti/sandbox/attribute.rb
|
267
|
-
- lib/yoti/sandbox/profile.rb
|
268
|
-
- lib/yoti/sandbox/sandbox.rb
|
269
|
-
- lib/yoti/sandbox/sandbox_client.rb
|
270
261
|
- lib/yoti/share/attribute_issuance_details.rb
|
271
262
|
- lib/yoti/share/extra_data.rb
|
272
263
|
- lib/yoti/ssl.rb
|
273
264
|
- lib/yoti/util/age_processor.rb
|
274
265
|
- lib/yoti/util/anchor_processor.rb
|
275
266
|
- lib/yoti/util/log.rb
|
267
|
+
- lib/yoti/util/validation.rb
|
276
268
|
- lib/yoti/version.rb
|
277
|
-
- login_flow.png
|
278
269
|
- rubocop.yml
|
279
270
|
- yardstick.yml
|
280
271
|
- yoti.gemspec
|
@@ -297,8 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
288
|
- !ruby/object:Gem::Version
|
298
289
|
version: '0'
|
299
290
|
requirements: []
|
300
|
-
|
301
|
-
rubygems_version: 2.6.14.4
|
291
|
+
rubygems_version: 3.0.6
|
302
292
|
signing_key:
|
303
293
|
specification_version: 4
|
304
294
|
summary: Yoti Ruby SDK for back-end integration.
|
data/lib/yoti/sandbox.rb
DELETED
data/lib/yoti/sandbox/anchor.rb
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Sandbox
|
4
|
-
# Anchor describes an anchor on a Sandbox Attribute
|
5
|
-
class Anchor
|
6
|
-
attr_reader :type
|
7
|
-
attr_reader :value
|
8
|
-
attr_reader :sub_type
|
9
|
-
attr_reader :timestamp
|
10
|
-
|
11
|
-
def initialize(type:, value:, sub_type: '', timestamp: Time.now)
|
12
|
-
@type = type
|
13
|
-
@value = value
|
14
|
-
@sub_type = sub_type
|
15
|
-
@timestamp = timestamp
|
16
|
-
end
|
17
|
-
|
18
|
-
def as_json(*_args)
|
19
|
-
{
|
20
|
-
type: @type,
|
21
|
-
value: @value,
|
22
|
-
sub_type: @sub_type,
|
23
|
-
timestamp: @timestamp.to_i
|
24
|
-
}
|
25
|
-
end
|
26
|
-
|
27
|
-
def to_json(*args)
|
28
|
-
as_json.to_json(*args)
|
29
|
-
end
|
30
|
-
|
31
|
-
def self.source(value, sub_type: '', timestamp: Time.now)
|
32
|
-
Anchor.new(
|
33
|
-
type: 'SOURCE',
|
34
|
-
value: value,
|
35
|
-
sub_type: sub_type,
|
36
|
-
timestamp: timestamp
|
37
|
-
)
|
38
|
-
end
|
39
|
-
|
40
|
-
def self.verifier(value, sub_type: '', timestamp: Time.now)
|
41
|
-
Anchor.new(
|
42
|
-
type: 'VERIFIER',
|
43
|
-
value: value,
|
44
|
-
sub_type: sub_type,
|
45
|
-
timestamp: timestamp
|
46
|
-
)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|