yoti 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +17 -0
  3. data/Gemfile +1 -0
  4. data/README.md +4 -1
  5. data/lib/generators/yoti/install/install_generator.rb +1 -1
  6. data/lib/yoti/activity_details.rb +46 -22
  7. data/lib/yoti/data_type/anchor.rb +5 -5
  8. data/lib/yoti/data_type/attribute.rb +16 -15
  9. data/lib/yoti/data_type/image.rb +19 -0
  10. data/lib/yoti/data_type/image_jpeg.rb +7 -0
  11. data/lib/yoti/data_type/image_png.rb +7 -0
  12. data/lib/yoti/data_type/multi_value.rb +48 -0
  13. data/lib/yoti/data_type/profile.rb +34 -30
  14. data/lib/yoti/data_type/signed_time_stamp.rb +7 -7
  15. data/lib/yoti/http/request.rb +2 -0
  16. data/lib/yoti/protobuf/attrpubapi/Attribute_pb.rb +40 -0
  17. data/lib/yoti/protobuf/attrpubapi/ContentType_pb.rb +25 -0
  18. data/lib/yoti/protobuf/attrpubapi/List_pb.rb +28 -0
  19. data/lib/yoti/protobuf/{v3/attrpubapi/signing_pb.rb → attrpubapi/Signing_pb.rb} +6 -6
  20. data/lib/yoti/protobuf/{v3/compubapi/encrypted_data_pb.rb → compubapi/EncryptedData_pb.rb} +4 -4
  21. data/lib/yoti/protobuf/{v3/compubapi/signed_time_stamp_pb.rb → compubapi/SignedTimestamp_pb.rb} +4 -4
  22. data/lib/yoti/protobuf/main.rb +41 -16
  23. data/lib/yoti/ssl.rb +6 -6
  24. data/lib/yoti/util/age_processor.rb +3 -3
  25. data/lib/yoti/util/anchor_processor.rb +67 -66
  26. data/lib/yoti/util/log.rb +23 -0
  27. data/lib/yoti/version.rb +1 -1
  28. data/lib/yoti.rb +5 -0
  29. data/rubocop.yml +17 -1
  30. data/yoti.gemspec +3 -3
  31. metadata +23 -22
  32. data/lib/yoti/protobuf/definitions/attrpubapi/attribute.proto +0 -52
  33. data/lib/yoti/protobuf/definitions/attrpubapi/list.proto +0 -27
  34. data/lib/yoti/protobuf/definitions/attrpubapi/signing.proto +0 -23
  35. data/lib/yoti/protobuf/definitions/compubapi/encrypted_data.proto +0 -15
  36. data/lib/yoti/protobuf/definitions/compubapi/signed_time_stamp.proto +0 -43
  37. data/lib/yoti/protobuf/v3/attrpubapi/attribute_pb.rb +0 -39
  38. data/lib/yoti/protobuf/v3/attrpubapi/list_pb.rb +0 -28
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6e5b60947899ea06491577de1490e6d380779ee74a3fd31dea4a794cd23ab775
4
- data.tar.gz: 9838261227d5aa667b9c91be67ad0002a87df137fdebd5505dcf2bcd5f912993
3
+ metadata.gz: e50de3d515cbe593c45eee88ea0d684d0a1eafa59d0df31e4f52977f802a0773
4
+ data.tar.gz: 7e3aad79f573318e00328341abb2e162b8d438c232b488eb6bade1ac8b38151a
5
5
  SHA512:
6
- metadata.gz: f5ccf44832dda707634563ace8d07a19653c19588582b3936ae71fda45ae7a181739e6faf2df2e1cf1da17c9048afb4fa78fa1ff33c6bc1cff05a3a0e8621d9b
7
- data.tar.gz: 1912aaf2ae74af86ce3457037b79f59683fcc1bf6b8707e97f024c2b4fdc8d7a1d0f7439d7fb72e917eca942d71adbf747fcc938cc56be13d509ad0eaf58ad08
6
+ metadata.gz: 2c229fc49f7ca7bb4b3868395dd3e01742b08b6371eab0e9c8f085ac23e2c653260b6e06e5f858a59e596e8cec4b2d541f008ea391a0bec9e8388cd29f4bca8f
7
+ data.tar.gz: df7636a39d76928759337e949384c9e118a299da275f06aa47918819aa9012795bd6a494056b7bb49825dc920677c3e8db9385d339557436c4361f242cd87b0c
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
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
data/Gemfile CHANGED
@@ -5,5 +5,6 @@ gem 'guard-rspec'
5
5
  gem 'pry'
6
6
  gem 'pry-byebug'
7
7
  gem 'rubocop'
8
+ gem 'rubocop-performance'
8
9
 
9
10
  gemspec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Yoti Ruby SDK
2
2
 
3
+ [![Build Status](https://travis-ci.com/getyoti/yoti-ruby-sdk.svg?branch=master)](https://travis-ci.com/getyoti/yoti-ruby-sdk)
4
+
3
5
  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.
4
6
 
5
7
  ## Table of Contents
@@ -303,7 +305,8 @@ Visiting `https://localhost:4567/` should show a Yoti Connect button
303
305
  ## API Coverage
304
306
 
305
307
  * Activity Details
306
- * [X] User ID `user_id`
308
+ * [X] Remember Me ID `remember_me_id`
309
+ * [X] Parent Remember Me ID `parent_remember_me_id`
307
310
  * [X] Base64 Selfie URI `base64_selfie_uri`
308
311
  * [X] Age verified `age_verified`
309
312
  * [X] Profile `profile`
@@ -1,7 +1,7 @@
1
1
  module Yoti
2
2
  module Generators
3
3
  class InstallGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../templates', __FILE__)
4
+ source_root File.expand_path('./templates', __dir__)
5
5
 
6
6
  desc 'This generator creates an Yoti initializer file at config/initializers'
7
7
 
@@ -6,9 +6,16 @@ module Yoti
6
6
  # @return [String] the outcome of the profile request, eg: SUCCESS
7
7
  attr_reader :outcome
8
8
 
9
+ # @deprecated replaced by :remember_me_id
9
10
  # @return [String] the Yoti ID
10
11
  attr_reader :user_id
11
12
 
13
+ # @return [String] the Remember Me ID
14
+ attr_reader :remember_me_id
15
+
16
+ # @return [String] the Parent Remember Me ID
17
+ attr_reader :parent_remember_me_id
18
+
12
19
  # @return [Hash] the decoded profile attributes
13
20
  attr_reader :user_profile
14
21
 
@@ -21,41 +28,58 @@ module Yoti
21
28
  # @param receipt [Hash] the receipt from the API request
22
29
  # @param decrypted_profile [Object] Protobuf AttributeList decrypted object containing the profile attributes
23
30
  def initialize(receipt, decrypted_profile = nil)
24
- @decrypted_profile = decrypted_profile
31
+ @remember_me_id = receipt['remember_me_id']
32
+ @user_id = @remember_me_id
33
+ @parent_remember_me_id = receipt['parent_remember_me_id']
34
+ @outcome = receipt['sharing_outcome']
25
35
  @user_profile = {}
26
36
  @extended_profile = {}
37
+ process_decrypted_profile(decrypted_profile)
38
+ end
27
39
 
28
- if @decrypted_profile.is_a?(Object) && @decrypted_profile.respond_to?(:attributes)
29
- @decrypted_profile.attributes.each do |field|
30
- @user_profile[field.name] = Yoti::Protobuf.value_based_on_content_type(field.value, field.content_type)
31
- anchor_processor = Yoti::AnchorProcessor.new(field.anchors)
32
- anchors_list = anchor_processor.process
40
+ # @return [Hash] a JSON of the address
41
+ def structured_postal_address
42
+ @user_profile['structured_postal_address']
43
+ end
33
44
 
34
- if field.name == 'selfie'
35
- @base64_selfie_uri = Yoti::Protobuf.image_uri_based_on_content_type(field.value, field.content_type)
36
- end
45
+ # @return [Profile] of Yoti user
46
+ def profile
47
+ Yoti::Profile.new(@extended_profile)
48
+ end
37
49
 
50
+ protected
38
51
 
39
- if Yoti::AgeProcessor.is_age_verification(field.name)
40
- @age_verified = field.value == 'true'
41
- end
52
+ def process_decrypted_profile(decrypted_profile)
53
+ return nil unless decrypted_profile.is_a?(Object)
54
+ return nil unless decrypted_profile.respond_to?(:attributes)
42
55
 
43
- @extended_profile[field.name] = Yoti::Attribute.new(field.name, field.value, anchors_list['sources'], anchors_list['verifiers'])
56
+ decrypted_profile.attributes.each do |attribute|
57
+ begin
58
+ process_attribute(attribute)
59
+ process_age_verified(attribute)
60
+ rescue StandardError => e
61
+ Yoti::Log.logger.warn("#{e.message} (Attribute: #{attribute.name})")
44
62
  end
45
63
  end
46
-
47
- @user_id = receipt['remember_me_id']
48
- @outcome = receipt['sharing_outcome']
49
64
  end
50
65
 
51
- # @return [Hash] a JSON of the address
52
- def structured_postal_address
53
- @user_profile['structured_postal_address']
66
+ def process_attribute(attribute)
67
+ attr_value = Yoti::Protobuf.value_based_on_content_type(attribute.value, attribute.content_type)
68
+ attr_value = Yoti::Protobuf.value_based_on_attribute_name(attr_value, attribute.name)
69
+
70
+ # Handle selfies for backwards compatibility.
71
+ if attribute.name == Yoti::Attribute::SELFIE && attr_value.is_a?(Yoti::Image)
72
+ @base64_selfie_uri = attr_value.base64_content
73
+ attr_value = attr_value.content
74
+ end
75
+
76
+ anchors_list = Yoti::AnchorProcessor.new(attribute.anchors).process
77
+ @extended_profile[attribute.name] = Yoti::Attribute.new(attribute.name, attr_value, anchors_list['sources'], anchors_list['verifiers'])
78
+ @user_profile[attribute.name] = attr_value
54
79
  end
55
80
 
56
- # @return [Profile] of Yoti user
57
- def profile
58
- return Yoti::Profile.new(@extended_profile)
81
+ def process_age_verified(attribute)
82
+ @age_verified = attribute.value == 'true' if Yoti::AgeProcessor.is_age_verification(attribute.name)
59
83
  end
60
84
  end
61
85
  end
@@ -4,10 +4,10 @@ module Yoti
4
4
  attr_reader :value, :sub_type, :signed_time_stamp, :origin_server_certs
5
5
 
6
6
  def initialize(value, sub_type, signed_time_stamp, origin_server_certs)
7
- @value = value
8
- @sub_type = sub_type
9
- @signed_time_stamp = signed_time_stamp
10
- @origin_server_certs = origin_server_certs
7
+ @value = value
8
+ @sub_type = sub_type
9
+ @signed_time_stamp = signed_time_stamp
10
+ @origin_server_certs = origin_server_certs
11
11
  end
12
12
  end
13
- end
13
+ end
@@ -1,25 +1,26 @@
1
1
  module Yoti
2
2
  # Encapsulates profile attribute
3
3
  class Attribute
4
- FAMILY_NAME = 'family_name';
5
- GIVEN_NAMES = 'given_names';
6
- FULL_NAME = 'full_name';
7
- DATE_OF_BIRTH = 'date_of_birth';
8
- GENDER = 'gender';
9
- NATIONALITY = 'nationality';
10
- PHONE_NUMBER = 'phone_number';
11
- SELFIE = 'selfie';
12
- EMAIL_ADDRESS = 'email_address';
13
- POSTAL_ADDRESS = 'postal_address';
14
- STRUCTURED_POSTAL_ADDRESS = 'structured_postal_address';
4
+ FAMILY_NAME = 'family_name'
5
+ GIVEN_NAMES = 'given_names'
6
+ FULL_NAME = 'full_name'
7
+ DATE_OF_BIRTH = 'date_of_birth'
8
+ GENDER = 'gender'
9
+ NATIONALITY = 'nationality'
10
+ PHONE_NUMBER = 'phone_number'
11
+ SELFIE = 'selfie'
12
+ EMAIL_ADDRESS = 'email_address'
13
+ POSTAL_ADDRESS = 'postal_address'
14
+ STRUCTURED_POSTAL_ADDRESS = 'structured_postal_address'
15
+ DOCUMENT_IMAGES = 'document_images'
15
16
 
16
17
  attr_reader :name, :value, :sources, :verifiers
17
18
 
18
19
  def initialize(name, value, sources, verifiers)
19
- @name = name
20
- @value = value
21
- @sources = sources
22
- @verifiers = verifiers
20
+ @name = name
21
+ @value = value
22
+ @sources = sources
23
+ @verifiers = verifiers
23
24
  end
24
25
  end
25
26
  end
@@ -0,0 +1,19 @@
1
+ require 'base64'
2
+
3
+ module Yoti
4
+ class Image
5
+ attr_reader :content
6
+ attr_reader :mime_type
7
+
8
+ def initialize(content, mime_type)
9
+ raise(TypeError, 'Image is an abstract class, so cannot be instantiated') if self.class == Yoti::Image
10
+
11
+ @content = content
12
+ @mime_type = mime_type
13
+ end
14
+
15
+ def base64_content
16
+ "data:#{mime_type};base64,#{Base64.strict_encode64(content)}"
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,7 @@
1
+ module Yoti
2
+ class ImageJpeg < Image
3
+ def initialize(content)
4
+ super(content, 'image/jpeg')
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module Yoti
2
+ class ImagePng < Image
3
+ def initialize(content)
4
+ super(content, 'image/png')
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,48 @@
1
+ module Yoti
2
+ class MultiValue
3
+ def initialize(items)
4
+ raise(TypeError, "Arrays must be passed to #{self.class.name}") unless items.is_a?(Array)
5
+
6
+ @original_items = items
7
+ @items = items.dup
8
+ @filters = []
9
+ end
10
+
11
+ def allow_type(type)
12
+ filter { |value| value.is_a?(type) }
13
+ self
14
+ end
15
+
16
+ def filter(&callback)
17
+ @filters.push(callback)
18
+ apply_filters
19
+ self
20
+ end
21
+
22
+ def items
23
+ apply_filters
24
+ @items.clone.freeze
25
+ end
26
+
27
+ private
28
+
29
+ def apply_filters
30
+ @items = @original_items.dup
31
+
32
+ if @filters.count.positive?
33
+ @items.keep_if do |item|
34
+ match = @filters.select { |callback| callback.call(item) }
35
+ match.count.positive?
36
+ end
37
+ end
38
+
39
+ @items.each do |item|
40
+ next unless item.is_a?(MultiValue)
41
+
42
+ @filters.each do |callback|
43
+ item.filter { |value| callback.call(value) }
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,77 +1,81 @@
1
1
  module Yoti
2
2
  # Encapsulates Yoti user profile
3
3
  class Profile
4
-
5
4
  def initialize(profile_data)
6
- if !profile_data.is_a? Object
7
- profile_data = Hash.new
8
- end
9
- @profile_data = profile_data
5
+ profile_data = {} unless profile_data.is_a? Object
6
+ @profile_data = profile_data
10
7
  end
11
8
 
12
9
  def selfie
13
- return get_attribute(Yoti::Attribute::SELFIE)
10
+ get_attribute(Yoti::Attribute::SELFIE)
14
11
  end
15
12
 
16
13
  def family_name
17
- return get_attribute(Yoti::Attribute::FAMILY_NAME)
14
+ get_attribute(Yoti::Attribute::FAMILY_NAME)
18
15
  end
19
16
 
20
17
  def given_names
21
- return get_attribute(Yoti::Attribute::GIVEN_NAMES)
18
+ get_attribute(Yoti::Attribute::GIVEN_NAMES)
22
19
  end
23
20
 
24
21
  def full_name
25
- return get_attribute(Yoti::Attribute::FULL_NAME)
22
+ get_attribute(Yoti::Attribute::FULL_NAME)
26
23
  end
27
24
 
28
25
  def phone_number
29
- return get_attribute(Yoti::Attribute::PHONE_NUMBER)
26
+ get_attribute(Yoti::Attribute::PHONE_NUMBER)
30
27
  end
31
28
 
32
29
  def email_address
33
- return get_attribute(Yoti::Attribute::EMAIL_ADDRESS)
30
+ get_attribute(Yoti::Attribute::EMAIL_ADDRESS)
34
31
  end
35
32
 
36
33
  def date_of_birth
37
- return get_attribute(Yoti::Attribute::DATE_OF_BIRTH)
34
+ get_attribute(Yoti::Attribute::DATE_OF_BIRTH)
38
35
  end
39
36
 
40
37
  def gender
41
- return get_attribute(Yoti::Attribute::GENDER)
38
+ get_attribute(Yoti::Attribute::GENDER)
42
39
  end
43
40
 
44
41
  def nationality
45
- return get_attribute(Yoti::Attribute::NATIONALITY)
42
+ get_attribute(Yoti::Attribute::NATIONALITY)
43
+ end
44
+
45
+ def document_images
46
+ get_attribute(Yoti::Attribute::DOCUMENT_IMAGES)
46
47
  end
47
48
 
48
49
  def postal_address
49
- postal_address = get_attribute(Yoti::Attribute::POSTAL_ADDRESS)
50
+ postal_address = get_attribute(Yoti::Attribute::POSTAL_ADDRESS)
51
+ return postal_address unless postal_address.nil?
50
52
 
51
- return postal_address unless postal_address.nil?
52
- return get_formatted_address
53
+ attribute_from_formatted_address
53
54
  end
54
55
 
55
56
  def structured_postal_address
56
- return get_attribute(Yoti::Attribute::STRUCTURED_POSTAL_ADDRESS)
57
+ get_attribute(Yoti::Attribute::STRUCTURED_POSTAL_ADDRESS)
57
58
  end
58
59
 
59
60
  # @return attribute value by name
60
61
  def get_attribute(attr_name)
61
- if @profile_data.has_key? attr_name then
62
- return @profile_data[attr_name]
63
- end
64
- return nil
62
+ return nil unless @profile_data.key? attr_name
63
+
64
+ @profile_data[attr_name]
65
65
  end
66
66
 
67
67
  protected
68
68
 
69
- def get_formatted_address
70
- full_address = structured_postal_address
71
- if !full_address.nil? && full_address.has_key?('formatted_address')
72
- return full_address['formatted_address']
73
- end
74
- return nil
75
- end
69
+ def attribute_from_formatted_address
70
+ return nil if structured_postal_address.nil?
71
+ return nil unless structured_postal_address.value.key?('formatted_address')
72
+
73
+ Yoti::Attribute.new(
74
+ Yoti::Attribute::POSTAL_ADDRESS,
75
+ structured_postal_address.value['formatted_address'],
76
+ structured_postal_address.sources,
77
+ structured_postal_address.verifiers
78
+ )
79
+ end
76
80
  end
77
- end
81
+ end
@@ -1,11 +1,11 @@
1
1
  module Yoti
2
- # Encapsulates anchor signed time stamp
3
- class SignedTimeStamp
4
- attr_reader :version, :time_stamp
2
+ # Encapsulates anchor signed time stamp
3
+ class SignedTimeStamp
4
+ attr_reader :version, :time_stamp
5
5
 
6
- def initialize(version, time_stamp)
7
- @version = version
8
- @time_stamp = time_stamp
9
- end
6
+ def initialize(version, time_stamp)
7
+ @version = version
8
+ @time_stamp = time_stamp
10
9
  end
10
+ end
11
11
  end
@@ -26,6 +26,7 @@ module Yoti
26
26
  end
27
27
 
28
28
  raise RequestError, "Unsuccessful Yoti API call: #{res.message}" unless res.code == '200'
29
+
29
30
  res.body
30
31
  end
31
32
 
@@ -71,6 +72,7 @@ module Yoti
71
72
 
72
73
  def token
73
74
  return '' unless @encrypted_connect_token
75
+
74
76
  Yoti::SSL.decrypt_token(@encrypted_connect_token)
75
77
  end
76
78
 
@@ -0,0 +1,40 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: Attribute.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'ContentType_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "attrpubapi_v1.Attribute" do
9
+ optional :name, :string, 1
10
+ optional :value, :bytes, 2
11
+ optional :content_type, :enum, 3, "attrpubapi_v1.ContentType"
12
+ repeated :anchors, :message, 4, "attrpubapi_v1.Anchor"
13
+ end
14
+ add_message "attrpubapi_v1.Anchor" do
15
+ optional :artifact_link, :bytes, 1
16
+ repeated :origin_server_certs, :bytes, 2
17
+ optional :artifact_signature, :bytes, 3
18
+ optional :sub_type, :string, 4
19
+ optional :signature, :bytes, 5
20
+ optional :signed_time_stamp, :bytes, 6
21
+ end
22
+ add_message "attrpubapi_v1.MultiValue" do
23
+ repeated :values, :message, 1, "attrpubapi_v1.MultiValue.Value"
24
+ end
25
+ add_message "attrpubapi_v1.MultiValue.Value" do
26
+ optional :content_type, :enum, 1, "attrpubapi_v1.ContentType"
27
+ optional :data, :bytes, 2
28
+ end
29
+ end
30
+
31
+ module Yoti
32
+ module Protobuf
33
+ module Attrpubapi
34
+ Attribute = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.Attribute").msgclass
35
+ Anchor = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.Anchor").msgclass
36
+ MultiValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.MultiValue").msgclass
37
+ MultiValue::Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.MultiValue.Value").msgclass
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,25 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: ContentType.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_enum "attrpubapi_v1.ContentType" do
8
+ value :UNDEFINED, 0
9
+ value :STRING, 1
10
+ value :JPEG, 2
11
+ value :DATE, 3
12
+ value :PNG, 4
13
+ value :JSON, 5
14
+ value :MULTI_VALUE, 6
15
+ value :INT, 7
16
+ end
17
+ end
18
+
19
+ module Yoti
20
+ module Protobuf
21
+ module Attrpubapi
22
+ ContentType = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.ContentType").enummodule
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,28 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: List.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'Attribute_pb'
7
+ Google::Protobuf::DescriptorPool.generated_pool.build do
8
+ add_message "attrpubapi_v1.AttributeAndId" do
9
+ optional :attribute, :message, 1, "attrpubapi_v1.Attribute"
10
+ optional :attribute_id, :bytes, 2
11
+ end
12
+ add_message "attrpubapi_v1.AttributeAndIdList" do
13
+ repeated :attribute_and_id_list, :message, 1, "attrpubapi_v1.AttributeAndId"
14
+ end
15
+ add_message "attrpubapi_v1.AttributeList" do
16
+ repeated :attributes, :message, 1, "attrpubapi_v1.Attribute"
17
+ end
18
+ end
19
+
20
+ module Yoti
21
+ module Protobuf
22
+ module Attrpubapi
23
+ AttributeAndId = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.AttributeAndId").msgclass
24
+ AttributeAndIdList = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.AttributeAndIdList").msgclass
25
+ AttributeList = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.AttributeList").msgclass
26
+ end
27
+ end
28
+ end
@@ -1,14 +1,14 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: signing.proto
2
+ # source: Signing.proto
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
- require_relative 'attribute_pb'
6
+ require 'ContentType_pb'
7
7
  Google::Protobuf::DescriptorPool.generated_pool.build do
8
- add_message "Yoti.Protobuf.attrpubapi_v3.AttributeSigning" do
8
+ add_message "attrpubapi_v1.AttributeSigning" do
9
9
  optional :name, :string, 1
10
10
  optional :value, :bytes, 2
11
- optional :content_type, :enum, 3, "Yoti.Protobuf.attrpubapi_v3.ContentType"
11
+ optional :content_type, :enum, 3, "attrpubapi_v1.ContentType"
12
12
  optional :artifact_signature, :bytes, 4
13
13
  optional :sub_type, :string, 5
14
14
  optional :signed_time_stamp, :bytes, 6
@@ -17,8 +17,8 @@ end
17
17
 
18
18
  module Yoti
19
19
  module Protobuf
20
- module AttrpubapiV3
21
- AttributeSigning = Google::Protobuf::DescriptorPool.generated_pool.lookup("Yoti.Protobuf.attrpubapi_v3.AttributeSigning").msgclass
20
+ module Attrpubapi
21
+ AttributeSigning = Google::Protobuf::DescriptorPool.generated_pool.lookup("attrpubapi_v1.AttributeSigning").msgclass
22
22
  end
23
23
  end
24
24
  end
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: encrypted_data.proto
2
+ # source: EncryptedData.proto
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "Yoti.Protobuf.compubapi_v3.EncryptedData" do
7
+ add_message "compubapi_v1.EncryptedData" do
8
8
  optional :iv, :bytes, 1
9
9
  optional :cipher_text, :bytes, 2
10
10
  end
@@ -12,8 +12,8 @@ end
12
12
 
13
13
  module Yoti
14
14
  module Protobuf
15
- module CompubapiV3
16
- EncryptedData = Google::Protobuf::DescriptorPool.generated_pool.lookup("Yoti.Protobuf.compubapi_v3.EncryptedData").msgclass
15
+ module Compubapi
16
+ EncryptedData = Google::Protobuf::DescriptorPool.generated_pool.lookup("compubapi_v1.EncryptedData").msgclass
17
17
  end
18
18
  end
19
19
  end
@@ -1,10 +1,10 @@
1
1
  # Generated by the protocol buffer compiler. DO NOT EDIT!
2
- # source: signed_time_stamp.proto
2
+ # source: SignedTimestamp.proto
3
3
 
4
4
  require 'google/protobuf'
5
5
 
6
6
  Google::Protobuf::DescriptorPool.generated_pool.build do
7
- add_message "Yoti.Protobuf.compubapi_v3.SignedTimestamp" do
7
+ add_message "compubapi_v1.SignedTimestamp" do
8
8
  optional :version, :int32, 1
9
9
  optional :timestamp, :uint64, 2
10
10
  optional :message_digest, :bytes, 3
@@ -16,8 +16,8 @@ end
16
16
 
17
17
  module Yoti
18
18
  module Protobuf
19
- module CompubapiV3
20
- SignedTimestamp = Google::Protobuf::DescriptorPool.generated_pool.lookup("Yoti.Protobuf.compubapi_v3.SignedTimestamp").msgclass
19
+ module Compubapi
20
+ SignedTimestamp = Google::Protobuf::DescriptorPool.generated_pool.lookup("compubapi_v1.SignedTimestamp").msgclass
21
21
  end
22
22
  end
23
23
  end