yoti 1.5.0 → 1.6.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.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/Gemfile +0 -2
  3. data/README.md +1 -1
  4. data/Rakefile +8 -0
  5. data/lib/yoti.rb +16 -0
  6. data/lib/yoti/activity_details.rb +17 -2
  7. data/lib/yoti/client.rb +2 -1
  8. data/lib/yoti/data_type/age_verification.rb +54 -0
  9. data/lib/yoti/data_type/attribute.rb +3 -0
  10. data/lib/yoti/data_type/base_profile.rb +13 -0
  11. data/lib/yoti/data_type/document_details.rb +96 -0
  12. data/lib/yoti/data_type/profile.rb +76 -0
  13. data/lib/yoti/dynamic_share_service/dynamic_scenario.rb +67 -0
  14. data/lib/yoti/dynamic_share_service/extension/extension.rb +45 -0
  15. data/lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb +88 -0
  16. data/lib/yoti/dynamic_share_service/extension/thirdparty_attribute_extension.rb +58 -0
  17. data/lib/yoti/dynamic_share_service/extension/transactional_flow_extension.rb +47 -0
  18. data/lib/yoti/dynamic_share_service/policy/dynamic_policy.rb +184 -0
  19. data/lib/yoti/dynamic_share_service/policy/source_constraint.rb +88 -0
  20. data/lib/yoti/dynamic_share_service/policy/wanted_anchor.rb +53 -0
  21. data/lib/yoti/dynamic_share_service/policy/wanted_attribute.rb +85 -0
  22. data/lib/yoti/dynamic_share_service/share_url.rb +80 -0
  23. data/lib/yoti/http/profile_request.rb +1 -0
  24. data/lib/yoti/http/request.rb +13 -0
  25. data/lib/yoti/http/signed_request.rb +0 -3
  26. data/lib/yoti/protobuf/main.rb +11 -0
  27. data/lib/yoti/protobuf/sharepubapi/DataEntry_pb.rb +29 -0
  28. data/lib/yoti/protobuf/sharepubapi/ExtraData_pb.rb +19 -0
  29. data/lib/yoti/protobuf/sharepubapi/IssuingAttributes_pb.rb +23 -0
  30. data/lib/yoti/protobuf/sharepubapi/ThirdPartyAttribute_pb.rb +20 -0
  31. data/lib/yoti/sandbox.rb +5 -0
  32. data/lib/yoti/sandbox/anchor.rb +49 -0
  33. data/lib/yoti/sandbox/attribute.rb +52 -0
  34. data/lib/yoti/sandbox/profile.rb +171 -0
  35. data/lib/yoti/sandbox/sandbox.rb +105 -0
  36. data/lib/yoti/sandbox/sandbox_client.rb +45 -0
  37. data/lib/yoti/share/attribute_issuance_details.rb +43 -0
  38. data/lib/yoti/share/extra_data.rb +25 -0
  39. data/lib/yoti/ssl.rb +7 -0
  40. data/lib/yoti/util/age_processor.rb +4 -0
  41. data/lib/yoti/version.rb +1 -1
  42. data/rubocop.yml +4 -0
  43. data/yoti.gemspec +4 -2
  44. metadata +61 -4
  45. data/.travis.yml +0 -17
data/lib/yoti/ssl.rb CHANGED
@@ -59,6 +59,13 @@ module Yoti
59
59
  ssl_decipher.update(text) + ssl_decipher.final
60
60
  end
61
61
 
62
+ # Reset and reload the Private Key used for SSL functions
63
+ def reload!
64
+ @private_key = nil
65
+ @pem = nil
66
+ nil
67
+ end
68
+
62
69
  private
63
70
 
64
71
  def private_key
@@ -1,5 +1,9 @@
1
1
  module Yoti
2
+ #
2
3
  # Process age attribute
4
+ #
5
+ # @deprecated 2.0.0 - replaced by Yoti::AgeVerification
6
+ #
3
7
  class AgeProcessor
4
8
  AGE_PATTERN = 'age_(over|under):[1-9][0-9]?[0-9]?'
5
9
 
data/lib/yoti/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Yoti
2
2
  # @return [String] the gem's current version
3
- VERSION = '1.5.0'.freeze
3
+ VERSION = '1.6.0'.freeze
4
4
  end
data/rubocop.yml CHANGED
@@ -6,8 +6,10 @@ AllCops:
6
6
  - 'examples/rails/config/**/*'
7
7
  - 'lib/yoti/protobuf/attrpubapi/*'
8
8
  - 'lib/yoti/protobuf/compubapi/*'
9
+ - 'lib/yoti/protobuf/sharepubapi/*'
9
10
 
10
11
  Metrics/AbcSize:
12
+ Enabled: false
11
13
  Max: 23
12
14
  Exclude:
13
15
  - examples/rails/app/controllers/yoti_controller.rb
@@ -21,12 +23,14 @@ Metrics/CyclomaticComplexity:
21
23
  Max: 9
22
24
 
23
25
  Metrics/ClassLength:
26
+ Enabled: false
24
27
  Max: 115
25
28
 
26
29
  Metrics/LineLength:
27
30
  Enabled: false
28
31
 
29
32
  Metrics/MethodLength:
33
+ Enabled: false
30
34
  CountComments: false
31
35
  Max: 19
32
36
  Exclude:
data/yoti.gemspec CHANGED
@@ -18,15 +18,17 @@ 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)/}) }
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$}) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
24
  spec.required_ruby_version = '>= 2.4'
25
25
 
26
- spec.add_dependency 'google-protobuf', '~> 3.7.0'
26
+ spec.add_dependency 'activesupport', '~> 5.0' # Pin activesupport library to 5.x for Ruby 2.4 support
27
+ spec.add_dependency 'google-protobuf', '~> 3.7', '>= 3.7.0'
27
28
  spec.add_dependency 'protobuf', '~> 3.6'
28
29
 
29
30
  spec.add_development_dependency 'bundler', '~> 2.0'
31
+ spec.add_development_dependency 'coveralls', '~> 0.8'
30
32
  spec.add_development_dependency 'dotenv', '~> 2.2'
31
33
  spec.add_development_dependency 'generator_spec', '~> 0.9'
32
34
  spec.add_development_dependency 'rake', '~> 12.0'
metadata CHANGED
@@ -1,20 +1,37 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yoti
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastian Zaremba
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-06 00:00:00.000000000 Z
11
+ date: 2020-01-15 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'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: google-protobuf
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.7'
34
+ - - ">="
18
35
  - !ruby/object:Gem::Version
19
36
  version: 3.7.0
20
37
  type: :runtime
@@ -22,6 +39,9 @@ dependencies:
22
39
  version_requirements: !ruby/object:Gem::Requirement
23
40
  requirements:
24
41
  - - "~>"
42
+ - !ruby/object:Gem::Version
43
+ version: '3.7'
44
+ - - ">="
25
45
  - !ruby/object:Gem::Version
26
46
  version: 3.7.0
27
47
  - !ruby/object:Gem::Dependency
@@ -52,6 +72,20 @@ dependencies:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
74
  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'
55
89
  - !ruby/object:Gem::Dependency
56
90
  name: dotenv
57
91
  requirement: !ruby/object:Gem::Requirement
@@ -175,7 +209,6 @@ extensions: []
175
209
  extra_rdoc_files: []
176
210
  files:
177
211
  - ".gitignore"
178
- - ".travis.yml"
179
212
  - CONTRIBUTING.md
180
213
  - Gemfile
181
214
  - Guardfile
@@ -188,16 +221,28 @@ files:
188
221
  - lib/yoti/activity_details.rb
189
222
  - lib/yoti/client.rb
190
223
  - lib/yoti/configuration.rb
224
+ - lib/yoti/data_type/age_verification.rb
191
225
  - lib/yoti/data_type/anchor.rb
192
226
  - lib/yoti/data_type/application_profile.rb
193
227
  - lib/yoti/data_type/attribute.rb
194
228
  - lib/yoti/data_type/base_profile.rb
229
+ - lib/yoti/data_type/document_details.rb
195
230
  - lib/yoti/data_type/image.rb
196
231
  - lib/yoti/data_type/image_jpeg.rb
197
232
  - lib/yoti/data_type/image_png.rb
198
233
  - lib/yoti/data_type/multi_value.rb
199
234
  - lib/yoti/data_type/profile.rb
200
235
  - lib/yoti/data_type/signed_time_stamp.rb
236
+ - lib/yoti/dynamic_share_service/dynamic_scenario.rb
237
+ - lib/yoti/dynamic_share_service/extension/extension.rb
238
+ - lib/yoti/dynamic_share_service/extension/location_constraint_extension.rb
239
+ - lib/yoti/dynamic_share_service/extension/thirdparty_attribute_extension.rb
240
+ - lib/yoti/dynamic_share_service/extension/transactional_flow_extension.rb
241
+ - lib/yoti/dynamic_share_service/policy/dynamic_policy.rb
242
+ - lib/yoti/dynamic_share_service/policy/source_constraint.rb
243
+ - lib/yoti/dynamic_share_service/policy/wanted_anchor.rb
244
+ - lib/yoti/dynamic_share_service/policy/wanted_attribute.rb
245
+ - lib/yoti/dynamic_share_service/share_url.rb
201
246
  - lib/yoti/errors.rb
202
247
  - lib/yoti/http/aml_check_request.rb
203
248
  - lib/yoti/http/payloads/aml_address.rb
@@ -212,6 +257,18 @@ files:
212
257
  - lib/yoti/protobuf/compubapi/EncryptedData_pb.rb
213
258
  - lib/yoti/protobuf/compubapi/SignedTimestamp_pb.rb
214
259
  - lib/yoti/protobuf/main.rb
260
+ - lib/yoti/protobuf/sharepubapi/DataEntry_pb.rb
261
+ - lib/yoti/protobuf/sharepubapi/ExtraData_pb.rb
262
+ - lib/yoti/protobuf/sharepubapi/IssuingAttributes_pb.rb
263
+ - 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
+ - lib/yoti/share/attribute_issuance_details.rb
271
+ - lib/yoti/share/extra_data.rb
215
272
  - lib/yoti/ssl.rb
216
273
  - lib/yoti/util/age_processor.rb
217
274
  - lib/yoti/util/anchor_processor.rb
@@ -241,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
298
  version: '0'
242
299
  requirements: []
243
300
  rubyforge_project:
244
- rubygems_version: 2.7.9
301
+ rubygems_version: 2.6.14.4
245
302
  signing_key:
246
303
  specification_version: 4
247
304
  summary: Yoti Ruby SDK for back-end integration.
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.4
4
- - 2.5
5
- - 2.6
6
-
7
- git:
8
- depth: 1
9
-
10
- before_install:
11
- - gem install bundler
12
-
13
- install:
14
- - bundle install
15
-
16
- script:
17
- - bundle exec rake