yoti 1.6.3 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -224
  3. data/lib/yoti.rb +54 -1
  4. data/lib/yoti/client.rb +13 -4
  5. data/lib/yoti/configuration.rb +7 -2
  6. data/lib/yoti/data_type/age_verification.rb +1 -1
  7. data/lib/yoti/data_type/base_profile.rb +1 -1
  8. data/lib/yoti/data_type/image.rb +4 -12
  9. data/lib/yoti/data_type/image_jpeg.rb +2 -0
  10. data/lib/yoti/data_type/image_png.rb +2 -0
  11. data/lib/yoti/data_type/media.rb +19 -0
  12. data/lib/yoti/data_type/signed_time_stamp.rb +1 -1
  13. data/lib/yoti/doc_scan/client.rb +187 -0
  14. data/lib/yoti/doc_scan/constants.rb +31 -0
  15. data/lib/yoti/doc_scan/errors.rb +81 -0
  16. data/lib/yoti/doc_scan/session/create/create_session_result.rb +50 -0
  17. data/lib/yoti/doc_scan/session/create/document_filter.rb +31 -0
  18. data/lib/yoti/doc_scan/session/create/document_restrictions_filter.rb +140 -0
  19. data/lib/yoti/doc_scan/session/create/notification_config.rb +142 -0
  20. data/lib/yoti/doc_scan/session/create/orthogonal_restrictions_filter.rb +150 -0
  21. data/lib/yoti/doc_scan/session/create/requested_check.rb +39 -0
  22. data/lib/yoti/doc_scan/session/create/requested_document_authenticity_check.rb +95 -0
  23. data/lib/yoti/doc_scan/session/create/requested_face_match_check.rb +95 -0
  24. data/lib/yoti/doc_scan/session/create/requested_id_document_comparison_check.rb +53 -0
  25. data/lib/yoti/doc_scan/session/create/requested_liveness_check.rb +108 -0
  26. data/lib/yoti/doc_scan/session/create/requested_task.rb +39 -0
  27. data/lib/yoti/doc_scan/session/create/requested_text_extraction_task.rb +116 -0
  28. data/lib/yoti/doc_scan/session/create/required_document.rb +31 -0
  29. data/lib/yoti/doc_scan/session/create/required_id_document.rb +53 -0
  30. data/lib/yoti/doc_scan/session/create/sdk_config.rb +221 -0
  31. data/lib/yoti/doc_scan/session/create/session_specification.rb +221 -0
  32. data/lib/yoti/doc_scan/session/retrieve/authenticity_check_response.rb +12 -0
  33. data/lib/yoti/doc_scan/session/retrieve/breakdown_response.rb +38 -0
  34. data/lib/yoti/doc_scan/session/retrieve/check_response.rb +63 -0
  35. data/lib/yoti/doc_scan/session/retrieve/details_response.rb +28 -0
  36. data/lib/yoti/doc_scan/session/retrieve/document_fields_response.rb +21 -0
  37. data/lib/yoti/doc_scan/session/retrieve/document_id_photo_response.rb +21 -0
  38. data/lib/yoti/doc_scan/session/retrieve/face_map_response.rb +21 -0
  39. data/lib/yoti/doc_scan/session/retrieve/face_match_check_response.rb +12 -0
  40. data/lib/yoti/doc_scan/session/retrieve/frame_response.rb +21 -0
  41. data/lib/yoti/doc_scan/session/retrieve/generated_check_response.rb +28 -0
  42. data/lib/yoti/doc_scan/session/retrieve/generated_media.rb +28 -0
  43. data/lib/yoti/doc_scan/session/retrieve/generated_text_data_check_response.rb +12 -0
  44. data/lib/yoti/doc_scan/session/retrieve/get_session_result.rb +127 -0
  45. data/lib/yoti/doc_scan/session/retrieve/id_document_comparison_check_response.rb +12 -0
  46. data/lib/yoti/doc_scan/session/retrieve/id_document_resource_response.rb +57 -0
  47. data/lib/yoti/doc_scan/session/retrieve/liveness_check_response.rb +12 -0
  48. data/lib/yoti/doc_scan/session/retrieve/liveness_resource_response.rb +24 -0
  49. data/lib/yoti/doc_scan/session/retrieve/media_response.rb +38 -0
  50. data/lib/yoti/doc_scan/session/retrieve/page_response.rb +27 -0
  51. data/lib/yoti/doc_scan/session/retrieve/recommendation_response.rb +34 -0
  52. data/lib/yoti/doc_scan/session/retrieve/report_response.rb +31 -0
  53. data/lib/yoti/doc_scan/session/retrieve/resource_container.rb +50 -0
  54. data/lib/yoti/doc_scan/session/retrieve/resource_response.rb +39 -0
  55. data/lib/yoti/doc_scan/session/retrieve/task_response.rb +87 -0
  56. data/lib/yoti/doc_scan/session/retrieve/text_data_check_response.rb +12 -0
  57. data/lib/yoti/doc_scan/session/retrieve/text_extraction_task_response.rb +18 -0
  58. data/lib/yoti/doc_scan/session/retrieve/zoom_liveness_resource_response.rb +33 -0
  59. data/lib/yoti/doc_scan/support/supported_documents.rb +60 -0
  60. data/lib/yoti/dynamic_share_service/extension/thirdparty_attribute_extension.rb +62 -11
  61. data/lib/yoti/dynamic_share_service/policy/dynamic_policy.rb +84 -22
  62. data/lib/yoti/dynamic_share_service/share_url.rb +28 -33
  63. data/lib/yoti/errors.rb +15 -2
  64. data/lib/yoti/http/aml_check_request.rb +12 -6
  65. data/lib/yoti/http/payloads/aml_address.rb +4 -0
  66. data/lib/yoti/http/payloads/aml_profile.rb +7 -1
  67. data/lib/yoti/http/profile_request.rb +11 -6
  68. data/lib/yoti/http/request.rb +221 -18
  69. data/lib/yoti/http/signed_request.rb +13 -4
  70. data/lib/yoti/protobuf/main.rb +1 -1
  71. data/lib/yoti/ssl.rb +2 -2
  72. data/lib/yoti/util/anchor_processor.rb +1 -1
  73. data/lib/yoti/util/validation.rb +41 -0
  74. data/lib/yoti/version.rb +1 -1
  75. data/yoti.gemspec +19 -9
  76. metadata +60 -67
  77. data/.github/ISSUE_TEMPLATE.md +0 -17
  78. data/.gitignore +0 -39
  79. data/CONTRIBUTING.md +0 -127
  80. data/Guardfile +0 -11
  81. data/Rakefile +0 -49
  82. data/login_flow.png +0 -0
  83. data/rubocop.yml +0 -57
  84. data/yardstick.yml +0 -9
data/Guardfile DELETED
@@ -1,11 +0,0 @@
1
- guard :rspec, cmd: 'bundle exec rspec -c -f doc' do
2
- # watch /lib/ files
3
- watch(%r{^lib/(.+).rb$}) do |m|
4
- "spec/#{m[1]}_spec.rb"
5
- end
6
-
7
- # watch /spec/ files
8
- watch(%r{^spec/(.+).rb$}) do |m|
9
- "spec/#{m[1]}.rb"
10
- end
11
- end
data/Rakefile DELETED
@@ -1,49 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'yaml'
4
-
5
- ################################
6
- # Tests #
7
- ################################
8
-
9
- RSpec::Core::RakeTask.new
10
- task test: :spec
11
-
12
- ################################
13
- # Coveralls #
14
- ################################
15
-
16
- require 'coveralls/rake/task'
17
- Coveralls::RakeTask.new
18
- task test_with_coveralls: [:spec, 'coveralls:push']
19
-
20
- ################################
21
- # Rubocop #
22
- ################################
23
-
24
- require 'rubocop/rake_task'
25
- RuboCop::RakeTask.new(:rubocop) do |t|
26
- t.options = ['--config', 'rubocop.yml']
27
- end
28
-
29
- ################################
30
- # Documentation #
31
- ################################
32
-
33
- require 'yard'
34
- YARD::Rake::YardocTask.new do |t|
35
- t.stats_options = ['--list-undoc']
36
- end
37
-
38
- yardstick_options = YAML.load_file('yardstick.yml')
39
-
40
- require 'yardstick/rake/measurement'
41
- Yardstick::Rake::Measurement.new(:measurement, yardstick_options) do |measurement|
42
- measurement.output = 'measurement/report.txt'
43
- end
44
-
45
- ################################
46
- # Defaults #
47
- ################################
48
-
49
- task default: %i[spec rubocop]
Binary file
@@ -1,57 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- DisplayStyleGuide: true
4
- TargetRubyVersion: 2.4
5
- Exclude:
6
- - 'examples/rails/config/**/*'
7
- - 'lib/yoti/protobuf/attrpubapi/*'
8
- - 'lib/yoti/protobuf/compubapi/*'
9
- - 'lib/yoti/protobuf/sharepubapi/*'
10
-
11
- Metrics/AbcSize:
12
- Enabled: false
13
- Max: 23
14
- Exclude:
15
- - examples/rails/app/controllers/yoti_controller.rb
16
-
17
- Metrics/BlockLength:
18
- Exclude:
19
- - spec/**/**/*.rb
20
- - yoti.gemspec
21
-
22
- Metrics/CyclomaticComplexity:
23
- Max: 9
24
-
25
- Metrics/ClassLength:
26
- Enabled: false
27
- Max: 115
28
-
29
- Metrics/LineLength:
30
- Enabled: false
31
-
32
- Metrics/MethodLength:
33
- Enabled: false
34
- CountComments: false
35
- Max: 19
36
- Exclude:
37
- - spec/yoti/data_type/multi_value_spec.rb
38
-
39
- Style/Documentation:
40
- Enabled: false
41
-
42
- Style/FrozenStringLiteralComment:
43
- Enabled: false
44
-
45
- Style/NumericLiterals:
46
- Enabled: false
47
-
48
- Style/MutableConstant:
49
- Enabled: false
50
-
51
- Naming/MethodName:
52
- Exclude:
53
- - lib/yoti/util/anchor_processor.rb
54
-
55
- Naming/PredicateName:
56
- Exclude:
57
- - lib/yoti/util/age_processor.rb
@@ -1,9 +0,0 @@
1
- rules:
2
- ApiTag::Presence:
3
- enabled: false
4
- ApiTag::Inclusion:
5
- enabled: false
6
- ApiTag::PrivateMethod:
7
- enabled: false
8
- ExampleTag:
9
- enabled: false