yoti 1.6.1 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +5 -5
  2. data/.github/ISSUE_TEMPLATE.md +17 -0
  3. data/.gitignore +1 -0
  4. data/CONTRIBUTING.md +1 -30
  5. data/README.md +23 -224
  6. data/Rakefile +9 -8
  7. data/lib/yoti.rb +50 -1
  8. data/lib/yoti/activity_details.rb +1 -0
  9. data/lib/yoti/client.rb +13 -4
  10. data/lib/yoti/configuration.rb +7 -2
  11. data/lib/yoti/data_type/age_verification.rb +1 -1
  12. data/lib/yoti/data_type/base_profile.rb +1 -1
  13. data/lib/yoti/data_type/document_details.rb +5 -13
  14. data/lib/yoti/data_type/image.rb +4 -12
  15. data/lib/yoti/data_type/image_jpeg.rb +2 -0
  16. data/lib/yoti/data_type/image_png.rb +2 -0
  17. data/lib/yoti/data_type/media.rb +19 -0
  18. data/lib/yoti/doc_scan/client.rb +163 -0
  19. data/lib/yoti/doc_scan/constants.rb +28 -0
  20. data/lib/yoti/doc_scan/session/create/create_session_result.rb +50 -0
  21. data/lib/yoti/doc_scan/session/create/document_filter.rb +31 -0
  22. data/lib/yoti/doc_scan/session/create/document_restrictions_filter.rb +140 -0
  23. data/lib/yoti/doc_scan/session/create/notification_config.rb +142 -0
  24. data/lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb +150 -0
  25. data/lib/yoti/doc_scan/session/create/requested_check.rb +39 -0
  26. data/lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb +53 -0
  27. data/lib/yoti/doc_scan/session/create/requested_face_match_check.rb +95 -0
  28. data/lib/yoti/doc_scan/session/create/requested_liveness_check.rb +108 -0
  29. data/lib/yoti/doc_scan/session/create/requested_task.rb +39 -0
  30. data/lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb +94 -0
  31. data/lib/yoti/doc_scan/session/create/required_document.rb +31 -0
  32. data/lib/yoti/doc_scan/session/create/required_id_document.rb +53 -0
  33. data/lib/yoti/doc_scan/session/create/sdk_config.rb +221 -0
  34. data/lib/yoti/doc_scan/session/create/session_specification.rb +203 -0
  35. data/lib/yoti/doc_scan/session/retrieve/authenticity_check_response.rb +12 -0
  36. data/lib/yoti/doc_scan/session/retrieve/breakdown_response.rb +38 -0
  37. data/lib/yoti/doc_scan/session/retrieve/check_response.rb +63 -0
  38. data/lib/yoti/doc_scan/session/retrieve/details_response.rb +28 -0
  39. data/lib/yoti/doc_scan/session/retrieve/document_fields_response.rb +21 -0
  40. data/lib/yoti/doc_scan/session/retrieve/face_map_response.rb +21 -0
  41. data/lib/yoti/doc_scan/session/retrieve/face_match_check_response.rb +12 -0
  42. data/lib/yoti/doc_scan/session/retrieve/frame_response.rb +21 -0
  43. data/lib/yoti/doc_scan/session/retrieve/generated_check_response.rb +28 -0
  44. data/lib/yoti/doc_scan/session/retrieve/generated_media.rb +28 -0
  45. data/lib/yoti/doc_scan/session/retrieve/generated_text_data_check_response.rb +12 -0
  46. data/lib/yoti/doc_scan/session/retrieve/get_session_result.rb +113 -0
  47. data/lib/yoti/doc_scan/session/retrieve/id_document_resource_response.rb +52 -0
  48. data/lib/yoti/doc_scan/session/retrieve/liveness_check_response.rb +12 -0
  49. data/lib/yoti/doc_scan/session/retrieve/liveness_resource_response.rb +24 -0
  50. data/lib/yoti/doc_scan/session/retrieve/media_response.rb +38 -0
  51. data/lib/yoti/doc_scan/session/retrieve/page_response.rb +27 -0
  52. data/lib/yoti/doc_scan/session/retrieve/recommendation_response.rb +34 -0
  53. data/lib/yoti/doc_scan/session/retrieve/report_response.rb +31 -0
  54. data/lib/yoti/doc_scan/session/retrieve/resource_container.rb +50 -0
  55. data/lib/yoti/doc_scan/session/retrieve/resource_response.rb +39 -0
  56. data/lib/yoti/doc_scan/session/retrieve/task_response.rb +87 -0
  57. data/lib/yoti/doc_scan/session/retrieve/text_data_check_response.rb +12 -0
  58. data/lib/yoti/doc_scan/session/retrieve/text_extraction_task_response.rb +18 -0
  59. data/lib/yoti/doc_scan/session/retrieve/zoom_liveness_resource_response.rb +33 -0
  60. data/lib/yoti/doc_scan/support/supported_documents.rb +60 -0
  61. data/lib/yoti/dynamic_share_service/extension/thirdparty_attribute_extension.rb +62 -11
  62. data/lib/yoti/dynamic_share_service/policy/dynamic_policy.rb +17 -17
  63. data/lib/yoti/dynamic_share_service/share_url.rb +28 -33
  64. data/lib/yoti/errors.rb +17 -2
  65. data/lib/yoti/http/aml_check_request.rb +12 -6
  66. data/lib/yoti/http/payloads/aml_address.rb +4 -0
  67. data/lib/yoti/http/payloads/aml_profile.rb +7 -1
  68. data/lib/yoti/http/profile_request.rb +11 -6
  69. data/lib/yoti/http/request.rb +221 -18
  70. data/lib/yoti/http/signed_request.rb +13 -4
  71. data/lib/yoti/protobuf/main.rb +1 -1
  72. data/lib/yoti/ssl.rb +3 -2
  73. data/lib/yoti/util/anchor_processor.rb +1 -1
  74. data/lib/yoti/util/validation.rb +41 -0
  75. data/lib/yoti/version.rb +1 -1
  76. data/rubocop.yml +9 -1
  77. data/yoti.gemspec +5 -8
  78. metadata +53 -63
  79. data/lib/yoti/sandbox.rb +0 -5
  80. data/lib/yoti/sandbox/anchor.rb +0 -49
  81. data/lib/yoti/sandbox/attribute.rb +0 -52
  82. data/lib/yoti/sandbox/profile.rb +0 -171
  83. data/lib/yoti/sandbox/sandbox.rb +0 -105
  84. data/lib/yoti/sandbox/sandbox_client.rb +0 -45
  85. data/login_flow.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 554c3f07a3798f6c7f40a0dcd126449a8d866fe6
4
- data.tar.gz: 3f09b020f30e99038faf01bc74db8106f4fc7b31
2
+ SHA256:
3
+ metadata.gz: f78d9caae30514cbb608f4156a54d6c8c2f7d82a3df8afbdf6295b8239e983a7
4
+ data.tar.gz: 59b9aad24b60db06445300441abfdf20203b52de713976d3a6815aca159b6579
5
5
  SHA512:
6
- metadata.gz: 37cbabc0963156cdd95bc7ba2bd1657ce01a180619c44993f4e2298e902f0d7856d924c887a1333bec73fd8c24c8d553136b18733470191df2a59b3d5399fca2
7
- data.tar.gz: 49c22b5abc8a43e6e3c7b0021a7b3a2c37b417f24f6247f01dd6844c638969b4c216be52fd0e646b1f1a4285d93ce2a3982b6d687f9d9d06451c3a4387b19369
6
+ metadata.gz: f656f156b49a6b96ed09271fcbb1fa312ef918195c184631481a9dee5e427c1c1866c58d43d97f09f7f38c7072b1bb9adb2de9acafa99d9c9f783845090d2eab
7
+ data.tar.gz: 601d9374b0320b4c59bf6c5378e50dbba524337ef28b2b6d74ba7eebbef4f30c029f187ce75f52a631343178e9281cd5d28c8b25e1c96c3531d1816bc67c0de8
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Custom issue template
3
+ about: " There's a better way to get help!"
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ #
11
+ # Wait ✋
12
+ #
13
+ # There's a better way to get help!
14
+ #
15
+ # Send your questions or issues to sdksupport@yoti.com
16
+ #
17
+ #
data/.gitignore CHANGED
@@ -18,6 +18,7 @@
18
18
  /_yardoc/
19
19
  /doc/
20
20
  /rdoc/
21
+ /yardoc/
21
22
 
22
23
  ## Environment normalization:
23
24
  /.bundle/
@@ -16,35 +16,6 @@ bundle exec guard
16
16
 
17
17
  Although this gem supports Ruby 2.0.0, in order to use the latest development dependencies you have to use at least Ruby 2.2.2.
18
18
 
19
- If you wish to compile `.proto` definitions to Ruby, you will need to install [Google's Protocol Buffers](http://code.google.com/p/protobuf).
20
-
21
- ### OSX
22
-
23
- ```shell
24
- brew install protobuf
25
- ```
26
-
27
- ### Ubuntu
28
-
29
- ```shell
30
- sudo apt-get install -y protobuf
31
- ```
32
-
33
- This gem relies heavily on the [Ruby Protobuf][] gem. For more information on how Google Protobuf works, please see the [Wiki pages][].
34
-
35
- Compiling the common and attribute `.proto` definitions can be done with the following commands:
36
-
37
- ```shell
38
- cd lib/yoti/protobuf/v1
39
- protoc -I definitions/attribute-public-api/attrpubapi_v1 --ruby_out ./attribute_public_api definitions/attribute-public-api/attrpubapi_v1/*.proto
40
- protoc -I definitions/common-public-api/compubapi_v1/ --ruby_out ./common_public_api definitions/common-public-api/compubapi_v1/*.proto
41
- ```
42
-
43
- These commands will overwrite the current protobuf Ruby modules, which have been modified. If the protobuf files have to be updated, a good idea would be to change them manually, or generate the files in a new location, and compare the content.
44
-
45
- [Ruby Protobuf]: https://github.com/ruby-protobuf/protobuf/
46
- [Wiki Pages]: https://github.com/ruby-protobuf/protobuf/wiki
47
-
48
19
  ## Requirements
49
20
 
50
21
  ### Code coverage
@@ -80,7 +51,7 @@ Verifies the documentation with [Yardstick][] and generates the `measurement/rep
80
51
  bundle exec rake yard
81
52
  ```
82
53
 
83
- Generates [YARD][] documentation in the doc folder.
54
+ Generates [YARD][] documentation in the `./yardoc` folder.
84
55
 
85
56
  ### Git
86
57
 
data/README.md CHANGED
@@ -1,44 +1,25 @@
1
1
  # Yoti Ruby SDK
2
2
 
3
3
  [![Build Status](https://travis-ci.com/getyoti/yoti-ruby-sdk.svg?branch=master)](https://travis-ci.com/getyoti/yoti-ruby-sdk)
4
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aruby&metric=coverage)](https://sonarcloud.io/dashboard?id=getyoti%3Aruby)
5
+ [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aruby&metric=bugs)](https://sonarcloud.io/dashboard?id=getyoti%3Aruby)
6
+ [![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aruby&metric=code_smells)](https://sonarcloud.io/dashboard?id=getyoti%3Aruby)
7
+ [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=getyoti%3Aruby&metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=getyoti%3Aruby)
4
8
 
5
9
  Welcome to the Yoti Ruby SDK. This repository contains the tools you need to quickly integrate your Ruby back-end with Yoti so that your users can share their identity details with your application in a secure and trusted way.
6
10
 
7
11
  ## Table of Contents
8
12
 
9
- 1. [An Architectural view](#an-architectural-view) - High level overview of integration
10
13
  1. [Requirements](#requirements) - Everything you need to get started
11
- 1. [Installing the SDK](#installing-the-sdk) - How to install our SDK
12
- 1. [Configuration](#configuration) - Configuring the SDK
13
- 1. [Profile Retrieval](#profile-retrieval) - How to retrieve a Yoti profile using the one time use token
14
- 1. [AML Integration](#aml-integration) - How to integrate with Yoti's AML (Anti Money Laundering) service
15
- 1. [Running the Examples](#running-the-examples) - How to run the example projects provided
16
- 1. [API Coverage](#api-coverage) - Attributes defined
17
- 1. [Support](#support) - Please feel free to reach out
18
-
19
- ## An Architectural view
20
-
21
- To integrate your application with Yoti, your back-end must expose a GET endpoint that Yoti will use to forward tokens.
22
- The endpoint is configured in the [Yoti Hub](https://hub.yoti.com) where you create/update your application. To see an example of how this is configured, see the [Running the Examples](#running-the-examples) section.
23
14
 
24
- The image below shows how your application back-end and Yoti integrate into the context of a Login flow.
25
- Yoti SDK carries out for you steps 6, 7, 8 and the profile decryption in step 9.
26
-
27
- ![alt text](login_flow.png "Login flow")
28
-
29
- Yoti also allows you to enable user details verification from your mobile app by means of the Android (TBA) and iOS (TBA) SDKs. In that scenario, your Yoti-enabled mobile app is playing both the role of the browser and the Yoti app. Your back-end doesn't need to handle these cases in a significantly different way, but you might decide to handle the `User-Agent` header in order to provide different responses for desktop and mobile clients.
15
+ 1. [Installing the SDK](#installing-the-sdk) - How to install our SDK
30
16
 
31
- ## References
17
+ 1. [Setup](#setup) - Setup required before using the Yoti services
32
18
 
33
- * [AES-256 symmetric encryption][]
34
- * [RSA pkcs asymmetric encryption][]
35
- * [Protocol buffers][]
36
- * [Base64 data][]
19
+ 1. [Products](#products) -
20
+ Links to more information about the products offered by the Yoti SDK
37
21
 
38
- [AES-256 symmetric encryption]: https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
39
- [RSA pkcs asymmetric encryption]: https://en.wikipedia.org/wiki/RSA_(cryptosystem)
40
- [Protocol buffers]: https://en.wikipedia.org/wiki/Protocol_Buffers
41
- [Base64 data]: https://en.wikipedia.org/wiki/Base64
22
+ 1. [Support](#support) - Please feel free to reach out
42
23
 
43
24
  ## Requirements
44
25
 
@@ -72,7 +53,7 @@ bundle install
72
53
  Or simply run the following command from your terminal:
73
54
 
74
55
  ```shell
75
- [sudo] gem install yoti
56
+ gem install yoti
76
57
  ```
77
58
 
78
59
  ## SDK Project Import
@@ -85,7 +66,12 @@ rails generate yoti:install
85
66
 
86
67
  The generated initialisation file can be found in `config/initializers/yoti.rb`.
87
68
 
88
- ## Configuration
69
+ ## Setup
70
+
71
+ For each service you will need:
72
+
73
+ * Your Client SDK ID, generated by [Yoti Hub](https://hub.yoti.com) when you create (and then publish) your app.
74
+ * Your .pem file. This is your own unique private key which your browser generates from the [Yoti Hub](https://hub.yoti.com) when you create an application.
89
75
 
90
76
  A minimal Yoti client initialisation looks like this:
91
77
 
@@ -97,10 +83,8 @@ end
97
83
  ```
98
84
 
99
85
  Make sure the following environment variables can be accessed by your app:
100
-
101
- `YOTI_CLIENT_SDK_ID` - found on the Key settings page on your Yoti Hub
102
-
103
- `YOTI_KEY_FILE_PATH` - the full path to your security key downloaded from the *Keys* settings page (e.g. /Users/developer/access-security.pem)
86
+ - `YOTI_CLIENT_SDK_ID`
87
+ - `YOTI_KEY_FILE_PATH`
104
88
 
105
89
  The following options are available:
106
90
 
@@ -140,197 +124,12 @@ heroku config:add YOTI_KEY ="$(cat your-access-security.pem)"
140
124
 
141
125
  [Heroku Command Line]: https://devcenter.heroku.com/articles/heroku-command-line
142
126
 
143
- ## Profile Retrieval
144
-
145
- When your application receives a one time use token via the exposed endpoint (it will be assigned to a query string parameter named `token`), you can easily retrieve the user profile:
146
-
147
- ```ruby
148
- one_time_use_token = params[:token]
149
- yoti_activity_details = Yoti::Client.get_activity_details(one_time_use_token)
150
- ```
151
-
152
- Before you inspect the user profile, you might want to check whether the user validation was successful. This is done as follows:
153
-
154
- ```ruby
155
- if yoti_activity_details.outcome == 'SUCCESS'
156
- profile = yoti_activity_details.profile
157
- given_names = profile.given_names.value
158
- family_name = profile.family_name.value
159
- else
160
- # handle unhappy path
161
- end
162
- ```
163
-
164
- The `profile` object provides a set of attributes corresponding to user attributes. Whether the attributes are present or not depends on the settings you have applied to your app on Yoti Hub.
165
-
166
- ### Handling Users
167
-
168
- When you retrieve the user profile, you receive a user ID generated by Yoti exclusively for your application.
169
- This means that if the same individual logs into another app, Yoti will assign her/him a different ID.
170
- You can use this ID to verify whether (for your application) the retrieved profile identifies a new or an existing user.
171
- Here is an example of how this works:
172
-
173
- ```ruby
174
- if yoti_activity_details.outcome == 'SUCCESS'
175
- user = your_user_search_function(yoti_activity_details.user_id)
176
- profile = yoti_activity_details.profile
177
-
178
- if user
179
- # handle login
180
- email = profile.email_address.value
181
- else
182
- # handle registration
183
- given_names = profile.given_names.value
184
- family_name = profile.family_name.value
185
- email = profile.email_address.value
186
- end
187
- else
188
- # handle unhappy path
189
- end
190
- ```
191
-
192
- Where `your_user_search_function` is a piece of logic in your app that is supposed to find a user, given a user_id. Regardless of whether the user is a new or an existing one, Yoti will always provide their profile, so you don't necessarily need to store it.
193
-
194
- You can retrieve the sources and verifiers for each attribute as follows:
195
-
196
- ```ruby
197
- given_names_sources = profile.given_names.sources # list of anchors
198
- given_names_verifiers = profile.given_names.verifiers # list of anchors
199
- given_names_anchors = profile.given_names.anchors # list of anchors
200
- ```
201
- You can also retrieve further properties from these respective anchors in the following way:
202
-
203
- ```ruby
204
- # Retrieving properties of the first anchor
205
- type = given_names_sources[0].type # string
206
- value = given_names_sources[0].value # string
207
- sub_type = given_names_sources[0].sub_type # string
208
- time_stamp = given_names_sources[0].signed_time_stamp.time_stamp # DateTime object
209
- origin_server_certs = given_names_sources[0].origin_server_certs # list of X509 certificates
210
- ```
211
-
212
- In case you want to prove the sources and verifiers of the helper`ActivityDetails.age_verified` on `Age Over 18` set as age derivation, please retrieve it's original attribute from the profile as follow:
213
-
214
- ```ruby
215
- age_attribute = profile.get_attribute('age_over:18')
216
- sources = age_attribute.sources
217
- verifiers = age_attribute.verifiers
218
- anchors = age_attribute.anchors
219
- ```
220
-
221
- ## AML Integration
222
-
223
- Yoti provides an AML (Anti Money Laundering) check service to allow a deeper KYC process to prevent fraud. This is a chargeable service, so please contact [sdksupport@yoti.com](mailto:sdksupport@yoti.com) for more information.
224
-
225
- Yoti will provide a boolean result on the following checks:
226
-
227
- * PEP list - Verify against Politically Exposed Persons list
228
- * Fraud list - Verify against US Social Security Administration Fraud (SSN Fraud) list
229
- * Watch list - Verify against watch lists from the Office of Foreign Assets Control
230
-
231
- To use this functionality you must ensure your application is assigned to your organisation in the Yoti Hub - please see [here](https://developers.yoti.com/yoti-app-integration/yoti-app-integration#step-1-creating-an-organisation) for further information.
232
-
233
- For the AML check you will need to provide the following:
234
-
235
- * Data provided by Yoti (please ensure you have selected the Given name(s) and Family name attributes for your scenario on the Yoti Hub)
236
- * Given name(s)
237
- * Family name
238
- * Data that must be collected from the user:
239
- * Country of residence (must be an ISO 3166 3-letter code)
240
- * Social Security Number (US citizens only)
241
- * Postcode/Zip code (US citizens only)
242
-
243
- ### Consent
244
-
245
- Performing an AML check on a person *requires* their consent.
246
- **You must ensure you have user consent *before* using this service.**
247
-
248
- ### Code Example
249
-
250
- Given a YotiClient initialised with your SDK ID and KeyPair (see [Client Initialisation](#client-initialisation)) performing an AML check is a straightforward case of providing basic profile data.
251
-
252
- ```ruby
253
- require 'yoti'
254
-
255
- Yoti.configure do |config|
256
- config.client_sdk_id = ENV['YOTI_CLIENT_SDK_ID']
257
- config.key_file_path = ENV['YOTI_KEY_FILE_PATH']
258
- end
259
-
260
- aml_address = Yoti::AmlAddress.new('GBR')
261
- aml_profile = Yoti::AmlProfile.new('Edward Richard George', 'Heath', aml_address)
262
-
263
- puts Yoti::Client.aml_check(aml_profile)
264
- ```
127
+ ## Products
265
128
 
266
- ## Running the Examples
267
-
268
- The examples can be found in the [examples folder](examples).
269
-
270
- ### Ruby on Rails
271
-
272
- 1. Create your application in the [Yoti Hub](https://hub.yoti.com)
273
- 1. Set the application domain of your app to `localhost:3001`
274
- 1. Set the scenario callback URL to `/profile`
275
- 1. Rename the [.env.example](examples/rails/.env.example) file to `.env`
276
- 1. Fill in the environment variables in this file with the ones specific to your application (mentioned in the [Configuration](#configuration) section)
277
- 1. Install the dependencies by running the following commands
278
- ```ruby
279
- $ bundle install
280
- $ gem install foreman # We are doing this as it's not recommended to include foreman in your Gemfile
281
- ```
282
- 1. Start the server `foreman start`
283
-
284
- Visiting `https://localhost:3001/` should show a Yoti Connect button
285
-
286
- ### Sinatra
287
-
288
- 1. Create your application in the [Yoti Hub](https://hub.yoti.com)
289
- 1. Set the application domain of your app to `localhost:4567`
290
- 1. Set the scenario callback URL to `/profile`
291
- 1. Rename the [.env.example](examples/sinatra/.env.example) file to `.env`
292
- 1. Fill in the environment variables in this file with the ones specific to your application (mentioned in the [Configuration](#configuration) section)
293
- 1. Install the dependencies by running the following commands
294
- ```ruby
295
- $ bundle install
296
- $ gem install foreman # We are doing this as it's not recommended to include foreman in your Gemfile
297
- ```
298
- 1. Start the server `foreman start`
299
-
300
- Visiting `https://localhost:4567/` should show a Yoti Connect button
301
-
302
- ### AML Check
303
-
304
- * rename the [.env.example](examples/aml_check/.env.example) file to `.env` and fill in the required configuration values
305
- * install the dependencies with `bundle install`
306
- * run the script with `ruby ./app.rb`
307
-
308
- ## API Coverage
309
-
310
- * Activity Details
311
- * [X] Remember Me ID `remember_me_id`
312
- * [X] Parent Remember Me ID `parent_remember_me_id`
313
- * [X] Receipt ID `receipt_id`
314
- * [X] Timestamp `timestamp`
315
- * [X] Base64 Selfie URI `base64_selfie_uri`
316
- * [X] Age verified `age_verified`
317
- * [X] Profile `profile`
318
- * [X] Selfie `selfie`
319
- * [X] Full Name `full_name`
320
- * [X] Given Names `given_names`
321
- * [X] Family Name `family_name`
322
- * [X] Mobile Number `phone_number`
323
- * [X] Email Address `email_address`
324
- * [X] Age / Date of Birth `date_of_birth`
325
- * [X] Address `postal_address`
326
- * [X] Structured Postal Address `structured_postal_address`
327
- * [X] Gender `gender`
328
- * [X] Nationality `nationality`
329
- * [X] Application Profile `application_profile`
330
- * [X] Name `name`
331
- * [X] URL `url`
332
- * [X] Logo `logo`
333
- * [X] Receipt Background Color `receipt_bgcolor`
129
+ The Yoti SDK can be used for the following products, follow the links for more information about each:
130
+ 1) [Yoti app integration](/docs/PROFILE.md) - Connect with already-verified customers.
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
334
133
 
335
134
  ## Support
336
135
 
data/Rakefile CHANGED
@@ -6,16 +6,15 @@ require 'yaml'
6
6
  # Tests #
7
7
  ################################
8
8
 
9
- RSpec::Core::RakeTask.new
10
- task test: :spec
9
+ RSpec::Core::RakeTask.new(:test_yoti) do |t|
10
+ t.pattern = ['spec/yoti']
11
+ end
11
12
 
12
- ################################
13
- # Coveralls #
14
- ################################
13
+ RSpec::Core::RakeTask.new(:test_generators) do |t|
14
+ t.pattern = ['spec/generators']
15
+ end
15
16
 
16
- require 'coveralls/rake/task'
17
- Coveralls::RakeTask.new
18
- task test_with_coveralls: [:spec, 'coveralls:push']
17
+ RSpec::Core::RakeTask.new(:spec)
19
18
 
20
19
  ################################
21
20
  # Rubocop #
@@ -32,6 +31,7 @@ end
32
31
 
33
32
  require 'yard'
34
33
  YARD::Rake::YardocTask.new do |t|
34
+ t.options = ['--output-dir', './yardoc']
35
35
  t.stats_options = ['--list-undoc']
36
36
  end
37
37
 
@@ -47,3 +47,4 @@ end
47
47
  ################################
48
48
 
49
49
  task default: %i[spec rubocop]
50
+ task test: %i[test_yoti test_generators rubocop]
@@ -18,6 +18,7 @@ require_relative 'yoti/data_type/application_profile'
18
18
  require_relative 'yoti/data_type/profile'
19
19
  require_relative 'yoti/data_type/attribute'
20
20
  require_relative 'yoti/data_type/signed_time_stamp'
21
+ require_relative 'yoti/data_type/media'
21
22
  require_relative 'yoti/data_type/image'
22
23
  require_relative 'yoti/data_type/image_jpeg'
23
24
  require_relative 'yoti/data_type/image_png'
@@ -26,7 +27,8 @@ require_relative 'yoti/data_type/document_details'
26
27
 
27
28
  require_relative 'yoti/util/age_processor'
28
29
  require_relative 'yoti/util/anchor_processor'
29
- require_relative 'yoti/util/log.rb'
30
+ require_relative 'yoti/util/log'
31
+ require_relative 'yoti/util/validation'
30
32
 
31
33
  require_relative 'yoti/activity_details'
32
34
  require_relative 'yoti/client'
@@ -47,6 +49,53 @@ require_relative 'yoti/dynamic_share_service/extension/thirdparty_attribute_exte
47
49
  require_relative 'yoti/share/extra_data'
48
50
  require_relative 'yoti/share/attribute_issuance_details'
49
51
 
52
+ require_relative 'yoti/doc_scan/client'
53
+ require_relative 'yoti/doc_scan/constants'
54
+
55
+ require_relative 'yoti/doc_scan/session/create/create_session_result'
56
+ require_relative 'yoti/doc_scan/session/create/requested_check'
57
+ require_relative 'yoti/doc_scan/session/create/requested_document_authenticity_check'
58
+ require_relative 'yoti/doc_scan/session/create/requested_face_match_check'
59
+ require_relative 'yoti/doc_scan/session/create/requested_liveness_check'
60
+ require_relative 'yoti/doc_scan/session/create/requested_task'
61
+ require_relative 'yoti/doc_scan/session/create/requested_text_extraction_task'
62
+ require_relative 'yoti/doc_scan/session/create/document_filter'
63
+ require_relative 'yoti/doc_scan/session/create/document_restrictions_filter'
64
+ require_relative 'yoti/doc_scan/session/create/orthogonal_restrictions_filter'
65
+ require_relative 'yoti/doc_scan/session/create/required_document'
66
+ require_relative 'yoti/doc_scan/session/create/required_id_document'
67
+ require_relative 'yoti/doc_scan/session/create/sdk_config'
68
+ require_relative 'yoti/doc_scan/session/create/notification_config'
69
+ require_relative 'yoti/doc_scan/session/create/session_specification'
70
+
71
+ require_relative 'yoti/doc_scan/session/retrieve/check_response'
72
+ require_relative 'yoti/doc_scan/session/retrieve/resource_response'
73
+ require_relative 'yoti/doc_scan/session/retrieve/authenticity_check_response'
74
+ require_relative 'yoti/doc_scan/session/retrieve/breakdown_response'
75
+ require_relative 'yoti/doc_scan/session/retrieve/details_response'
76
+ require_relative 'yoti/doc_scan/session/retrieve/document_fields_response'
77
+ require_relative 'yoti/doc_scan/session/retrieve/face_map_response'
78
+ require_relative 'yoti/doc_scan/session/retrieve/face_match_check_response'
79
+ require_relative 'yoti/doc_scan/session/retrieve/frame_response'
80
+ require_relative 'yoti/doc_scan/session/retrieve/generated_check_response'
81
+ require_relative 'yoti/doc_scan/session/retrieve/generated_media'
82
+ require_relative 'yoti/doc_scan/session/retrieve/generated_text_data_check_response'
83
+ require_relative 'yoti/doc_scan/session/retrieve/get_session_result'
84
+ require_relative 'yoti/doc_scan/session/retrieve/id_document_resource_response'
85
+ require_relative 'yoti/doc_scan/session/retrieve/liveness_check_response'
86
+ require_relative 'yoti/doc_scan/session/retrieve/liveness_resource_response'
87
+ require_relative 'yoti/doc_scan/session/retrieve/media_response'
88
+ require_relative 'yoti/doc_scan/session/retrieve/page_response'
89
+ require_relative 'yoti/doc_scan/session/retrieve/recommendation_response'
90
+ require_relative 'yoti/doc_scan/session/retrieve/report_response'
91
+ require_relative 'yoti/doc_scan/session/retrieve/resource_container'
92
+ require_relative 'yoti/doc_scan/session/retrieve/task_response'
93
+ require_relative 'yoti/doc_scan/session/retrieve/text_data_check_response'
94
+ require_relative 'yoti/doc_scan/session/retrieve/text_extraction_task_response'
95
+ require_relative 'yoti/doc_scan/session/retrieve/zoom_liveness_resource_response'
96
+
97
+ require_relative 'yoti/doc_scan/support/supported_documents'
98
+
50
99
  # The main module namespace of the Yoti gem
51
100
  module Yoti
52
101
  class << self