yoti 1.3.1 → 1.4.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.
- checksums.yaml +4 -4
- data/.travis.yml +17 -0
- data/Gemfile +1 -0
- data/README.md +4 -1
- data/lib/generators/yoti/install/install_generator.rb +1 -1
- data/lib/yoti/activity_details.rb +46 -22
- data/lib/yoti/data_type/anchor.rb +5 -5
- data/lib/yoti/data_type/attribute.rb +16 -15
- data/lib/yoti/data_type/image.rb +19 -0
- data/lib/yoti/data_type/image_jpeg.rb +7 -0
- data/lib/yoti/data_type/image_png.rb +7 -0
- data/lib/yoti/data_type/multi_value.rb +48 -0
- data/lib/yoti/data_type/profile.rb +34 -30
- data/lib/yoti/data_type/signed_time_stamp.rb +7 -7
- data/lib/yoti/http/request.rb +2 -0
- data/lib/yoti/protobuf/attrpubapi/Attribute_pb.rb +40 -0
- data/lib/yoti/protobuf/attrpubapi/ContentType_pb.rb +25 -0
- data/lib/yoti/protobuf/attrpubapi/List_pb.rb +28 -0
- data/lib/yoti/protobuf/{v3/attrpubapi/signing_pb.rb → attrpubapi/Signing_pb.rb} +6 -6
- data/lib/yoti/protobuf/{v3/compubapi/encrypted_data_pb.rb → compubapi/EncryptedData_pb.rb} +4 -4
- data/lib/yoti/protobuf/{v3/compubapi/signed_time_stamp_pb.rb → compubapi/SignedTimestamp_pb.rb} +4 -4
- data/lib/yoti/protobuf/main.rb +41 -16
- data/lib/yoti/ssl.rb +6 -6
- data/lib/yoti/util/age_processor.rb +3 -3
- data/lib/yoti/util/anchor_processor.rb +67 -66
- data/lib/yoti/util/log.rb +23 -0
- data/lib/yoti/version.rb +1 -1
- data/lib/yoti.rb +5 -0
- data/rubocop.yml +17 -1
- data/yoti.gemspec +3 -3
- metadata +23 -22
- data/lib/yoti/protobuf/definitions/attrpubapi/attribute.proto +0 -52
- data/lib/yoti/protobuf/definitions/attrpubapi/list.proto +0 -27
- data/lib/yoti/protobuf/definitions/attrpubapi/signing.proto +0 -23
- data/lib/yoti/protobuf/definitions/compubapi/encrypted_data.proto +0 -15
- data/lib/yoti/protobuf/definitions/compubapi/signed_time_stamp.proto +0 -43
- data/lib/yoti/protobuf/v3/attrpubapi/attribute_pb.rb +0 -39
- data/lib/yoti/protobuf/v3/attrpubapi/list_pb.rb +0 -28
data/lib/yoti/protobuf/main.rb
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path('./attrpubapi/', __dir__)
|
2
|
+
|
1
3
|
require 'google/protobuf'
|
2
4
|
require 'json'
|
3
|
-
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
5
|
+
|
6
|
+
require_relative 'attrpubapi/List_pb.rb'
|
7
|
+
require_relative 'compubapi/EncryptedData_pb.rb'
|
8
|
+
require_relative 'compubapi/SignedTimestamp_pb.rb'
|
6
9
|
|
7
10
|
module Yoti
|
8
11
|
module Protobuf
|
@@ -13,43 +16,65 @@ module Yoti
|
|
13
16
|
CT_DATE = :DATE # string in RFC3339 format (YYYY-MM-DD)
|
14
17
|
CT_PNG = :PNG # standard .png image
|
15
18
|
CT_JSON = :JSON # json_string
|
19
|
+
CT_MULTI_VALUE = :MULTI_VALUE # multi value
|
20
|
+
CT_INT = :INT # integer
|
16
21
|
|
17
22
|
def current_user(receipt)
|
18
23
|
return nil unless valid_receipt?(receipt)
|
19
24
|
|
20
25
|
profile_content = receipt['other_party_profile_content']
|
21
26
|
decoded_profile_content = Base64.decode64(profile_content)
|
22
|
-
Yoti::Protobuf::
|
27
|
+
Yoti::Protobuf::Compubapi::EncryptedData.decode(decoded_profile_content)
|
23
28
|
end
|
24
29
|
|
25
30
|
def attribute_list(data)
|
26
|
-
Yoti::Protobuf::
|
31
|
+
Yoti::Protobuf::Attrpubapi::AttributeList.decode(data)
|
27
32
|
end
|
28
33
|
|
29
|
-
def
|
30
|
-
case
|
31
|
-
when
|
32
|
-
raise
|
33
|
-
|
34
|
-
value.
|
35
|
-
when CT_JSON
|
36
|
-
JSON.parse(value)
|
34
|
+
def value_based_on_attribute_name(value, attr_name)
|
35
|
+
case attr_name
|
36
|
+
when Yoti::Attribute::DOCUMENT_IMAGES
|
37
|
+
raise(TypeError, 'Document Images could not be decoded') unless value.is_a?(Yoti::MultiValue)
|
38
|
+
|
39
|
+
value.allow_type(Yoti::Image).items
|
37
40
|
else
|
38
41
|
value
|
39
42
|
end
|
40
43
|
end
|
41
44
|
|
42
|
-
def
|
45
|
+
def value_based_on_content_type(value, content_type = nil)
|
46
|
+
raise(TypeError, 'Warning: value is NULL') if value.empty? && content_type != CT_STRING
|
47
|
+
|
43
48
|
case content_type
|
49
|
+
when CT_STRING, CT_DATE
|
50
|
+
value.encode('utf-8')
|
51
|
+
when CT_JSON
|
52
|
+
JSON.parse(value)
|
53
|
+
when CT_INT
|
54
|
+
value.to_i
|
44
55
|
when CT_JPEG
|
45
|
-
|
56
|
+
Yoti::ImageJpeg.new(value)
|
46
57
|
when CT_PNG
|
47
|
-
|
58
|
+
Yoti::ImagePng.new(value)
|
59
|
+
when CT_MULTI_VALUE
|
60
|
+
convert_multi_value(value)
|
61
|
+
else
|
62
|
+
Yoti::Log.logger.warn("Unknown Content Type '#{content_type}', parsing as a String")
|
63
|
+
value.encode('utf-8')
|
48
64
|
end
|
49
65
|
end
|
50
66
|
|
51
67
|
private
|
52
68
|
|
69
|
+
def convert_multi_value(value)
|
70
|
+
proto_multi_value = Yoti::Protobuf::Attrpubapi::MultiValue.decode(value)
|
71
|
+
items = []
|
72
|
+
proto_multi_value.values.each do |item|
|
73
|
+
items.append value_based_on_content_type(item.data, item.content_type)
|
74
|
+
end
|
75
|
+
MultiValue.new(items)
|
76
|
+
end
|
77
|
+
|
53
78
|
def valid_receipt?(receipt)
|
54
79
|
receipt.key?('other_party_profile_content') &&
|
55
80
|
!receipt['other_party_profile_content'].nil? &&
|
data/lib/yoti/ssl.rb
CHANGED
@@ -26,8 +26,8 @@ module Yoti
|
|
26
26
|
|
27
27
|
begin
|
28
28
|
private_key.private_decrypt(Base64.urlsafe_decode64(encrypted_connect_token))
|
29
|
-
rescue StandardError =>
|
30
|
-
raise SslError, "Could not decrypt token. #{
|
29
|
+
rescue StandardError => e
|
30
|
+
raise SslError, "Could not decrypt token. #{e}"
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -51,11 +51,11 @@ module Yoti
|
|
51
51
|
# @param 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
|
-
def decipher(key,
|
54
|
+
def decipher(key, user_iv, text)
|
55
55
|
ssl_decipher = OpenSSL::Cipher.new('AES-256-CBC')
|
56
56
|
ssl_decipher.decrypt
|
57
57
|
ssl_decipher.key = key
|
58
|
-
ssl_decipher.iv =
|
58
|
+
ssl_decipher.iv = user_iv
|
59
59
|
ssl_decipher.update(text) + ssl_decipher.final
|
60
60
|
end
|
61
61
|
|
@@ -63,8 +63,8 @@ module Yoti
|
|
63
63
|
|
64
64
|
def private_key
|
65
65
|
@private_key ||= OpenSSL::PKey::RSA.new(pem)
|
66
|
-
rescue StandardError =>
|
67
|
-
raise SslError, "The secure key is invalid. #{
|
66
|
+
rescue StandardError => e
|
67
|
+
raise SslError, "The secure key is invalid. #{e}"
|
68
68
|
end
|
69
69
|
end
|
70
70
|
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
module Yoti
|
2
2
|
# Process age attribute
|
3
3
|
class AgeProcessor
|
4
|
-
AGE_PATTERN =
|
4
|
+
AGE_PATTERN = 'age_(over|under):[1-9][0-9]?[0-9]?'
|
5
5
|
|
6
6
|
# check if the key matches the format age_[over|under]:[1-999]
|
7
7
|
def self.is_age_verification(age_field)
|
8
|
-
|
8
|
+
/#{AGE_PATTERN}/.match?(age_field)
|
9
9
|
end
|
10
10
|
end
|
11
|
-
end
|
11
|
+
end
|
@@ -4,97 +4,98 @@ require 'date'
|
|
4
4
|
module Yoti
|
5
5
|
# Parse attribute anchors
|
6
6
|
class AnchorProcessor
|
7
|
-
# Define whether the search function get_anchor_value_by_oid
|
8
|
-
# should return the next value in the array
|
9
|
-
attr_reader :get_next
|
10
|
-
|
11
|
-
protected :get_next
|
12
|
-
|
13
7
|
def initialize(anchors_list)
|
14
|
-
|
15
|
-
|
8
|
+
@anchors_list = anchors_list
|
9
|
+
@get_next = false
|
16
10
|
end
|
17
11
|
|
18
12
|
def process
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
13
|
+
result_data = { 'sources' => [], 'verifiers' => [] }
|
14
|
+
anchor_types = self.anchor_types
|
15
|
+
|
16
|
+
@anchors_list.each do |anchor|
|
17
|
+
x509_certs_list = convert_certs_list_to_X509(anchor.origin_server_certs)
|
18
|
+
yoti_signed_time_stamp = process_signed_time_stamp(anchor.signed_time_stamp)
|
19
|
+
|
20
|
+
anchor.origin_server_certs.each do |cert|
|
21
|
+
anchor_types.each do |type, oid|
|
22
|
+
yoti_anchor = get_anchor_by_oid(cert, oid, anchor.sub_type, yoti_signed_time_stamp, x509_certs_list)
|
23
|
+
result_data[type].push(yoti_anchor) unless yoti_anchor.nil?
|
24
|
+
end
|
34
25
|
end
|
26
|
+
end
|
35
27
|
|
36
|
-
|
28
|
+
result_data
|
37
29
|
end
|
38
30
|
|
39
31
|
def convert_certs_list_to_X509(certs_list)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
32
|
+
x509_certs_list = []
|
33
|
+
certs_list.each do |cert|
|
34
|
+
x509_cert = OpenSSL::X509::Certificate.new cert
|
35
|
+
x509_certs_list.push x509_cert
|
36
|
+
end
|
45
37
|
|
46
|
-
|
38
|
+
x509_certs_list
|
47
39
|
end
|
48
40
|
|
49
41
|
def process_signed_time_stamp(signed_time_stamp_binary)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
42
|
+
signed_time_stamp = Yoti::Protobuf::Compubapi::SignedTimestamp.decode(signed_time_stamp_binary)
|
43
|
+
time_in_sec = signed_time_stamp.timestamp / 1000000
|
44
|
+
date_time = Time.parse(Time.at(time_in_sec).to_s)
|
45
|
+
Yoti::SignedTimeStamp.new(signed_time_stamp.version, date_time)
|
54
46
|
end
|
55
47
|
|
56
48
|
def get_anchor_by_oid(cert, oid, sub_type, signed_time_stamp, x509_certs_list)
|
57
|
-
|
58
|
-
|
49
|
+
asn1_obj = OpenSSL::ASN1.decode(cert)
|
50
|
+
anchor_value = get_anchor_value_by_oid(asn1_obj, oid)
|
59
51
|
|
60
|
-
|
52
|
+
return nil if anchor_value.nil?
|
61
53
|
|
62
|
-
|
54
|
+
Yoti::Anchor.new(anchor_value, sub_type, signed_time_stamp, x509_certs_list)
|
63
55
|
end
|
64
56
|
|
65
57
|
def get_anchor_value_by_oid(obj, oid)
|
58
|
+
case obj
|
59
|
+
when OpenSSL::ASN1::Sequence, Array
|
60
|
+
return get_anchor_value_by_asn1_sequence(obj, oid)
|
61
|
+
when OpenSSL::ASN1::ASN1Data
|
62
|
+
return get_anchor_value_by_asn1_data(obj.value, oid)
|
63
|
+
end
|
64
|
+
|
65
|
+
# In case it's not a valid object
|
66
|
+
nil
|
67
|
+
end
|
66
68
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
rawValue = OpenSSL::ASN1.decode(obj.value)
|
80
|
-
anchorValue = rawValue.value[0].value
|
81
|
-
@get_next = false
|
82
|
-
return anchorValue
|
83
|
-
end
|
84
|
-
|
85
|
-
return get_anchor_value_by_oid(obj.value, oid)
|
86
|
-
else
|
87
|
-
return nil
|
88
|
-
end
|
69
|
+
def get_anchor_value_by_asn1_data(value, oid)
|
70
|
+
if value.respond_to?(:to_s) && value == oid
|
71
|
+
@get_next = true
|
72
|
+
elsif value.respond_to?(:to_s) && @get_next
|
73
|
+
raw_value = OpenSSL::ASN1.decode(value)
|
74
|
+
anchor_value = raw_value.value[0].value
|
75
|
+
@get_next = false
|
76
|
+
return anchor_value
|
77
|
+
end
|
78
|
+
|
79
|
+
get_anchor_value_by_oid(value, oid)
|
80
|
+
end
|
89
81
|
|
90
|
-
|
91
|
-
|
82
|
+
def get_anchor_value_by_asn1_sequence(obj, oid)
|
83
|
+
obj.each do |child_obj|
|
84
|
+
result = get_anchor_value_by_oid(child_obj, oid)
|
85
|
+
return result unless result.nil?
|
86
|
+
end
|
87
|
+
nil
|
92
88
|
end
|
93
89
|
|
94
90
|
def anchor_types
|
95
|
-
|
96
|
-
|
97
|
-
}
|
91
|
+
{ 'sources' => '1.3.6.1.4.1.47127.1.1.1',
|
92
|
+
'verifiers' => '1.3.6.1.4.1.47127.1.1.2' }
|
98
93
|
end
|
94
|
+
|
95
|
+
protected
|
96
|
+
|
97
|
+
# Define whether the search function get_anchor_value_by_oid
|
98
|
+
# should return the next value in the array
|
99
|
+
attr_reader :get_next
|
99
100
|
end
|
100
|
-
end
|
101
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'logger'
|
2
|
+
|
3
|
+
module Yoti
|
4
|
+
module Log
|
5
|
+
class << self
|
6
|
+
def logger
|
7
|
+
@logger || create_logger(STDOUT)
|
8
|
+
end
|
9
|
+
|
10
|
+
def output(output_stream)
|
11
|
+
create_logger(output_stream)
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def create_logger(output_stream)
|
17
|
+
@logger = Logger.new(output_stream)
|
18
|
+
@logger.progname = 'Yoti'
|
19
|
+
@logger
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/yoti/version.rb
CHANGED
data/lib/yoti.rb
CHANGED
@@ -15,9 +15,14 @@ require_relative 'yoti/data_type/anchor'
|
|
15
15
|
require_relative 'yoti/data_type/profile'
|
16
16
|
require_relative 'yoti/data_type/attribute'
|
17
17
|
require_relative 'yoti/data_type/signed_time_stamp'
|
18
|
+
require_relative 'yoti/data_type/image'
|
19
|
+
require_relative 'yoti/data_type/image_jpeg'
|
20
|
+
require_relative 'yoti/data_type/image_png'
|
21
|
+
require_relative 'yoti/data_type/multi_value'
|
18
22
|
|
19
23
|
require_relative 'yoti/util/age_processor'
|
20
24
|
require_relative 'yoti/util/anchor_processor'
|
25
|
+
require_relative 'yoti/util/log.rb'
|
21
26
|
|
22
27
|
require_relative 'yoti/activity_details'
|
23
28
|
require_relative 'yoti/client'
|
data/rubocop.yml
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
AllCops:
|
2
2
|
DisplayCopNames: true
|
3
3
|
DisplayStyleGuide: true
|
4
|
-
TargetRubyVersion: 2.
|
4
|
+
TargetRubyVersion: 2.4
|
5
5
|
Exclude:
|
6
6
|
- 'examples/rails/config/**/*'
|
7
|
+
- 'lib/yoti/protobuf/attrpubapi/*'
|
8
|
+
- 'lib/yoti/protobuf/compubapi/*'
|
7
9
|
|
8
10
|
Metrics/AbcSize:
|
9
11
|
Max: 23
|
@@ -13,6 +15,7 @@ Metrics/AbcSize:
|
|
13
15
|
Metrics/BlockLength:
|
14
16
|
Exclude:
|
15
17
|
- spec/**/**/*.rb
|
18
|
+
- yoti.gemspec
|
16
19
|
|
17
20
|
Metrics/CyclomaticComplexity:
|
18
21
|
Max: 9
|
@@ -23,6 +26,8 @@ Metrics/LineLength:
|
|
23
26
|
Metrics/MethodLength:
|
24
27
|
CountComments: false
|
25
28
|
Max: 19
|
29
|
+
Exclude:
|
30
|
+
- spec/yoti/data_type/multi_value_spec.rb
|
26
31
|
|
27
32
|
Style/Documentation:
|
28
33
|
Enabled: false
|
@@ -32,3 +37,14 @@ Style/FrozenStringLiteralComment:
|
|
32
37
|
|
33
38
|
Style/NumericLiterals:
|
34
39
|
Enabled: false
|
40
|
+
|
41
|
+
Style/MutableConstant:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Naming/MethodName:
|
45
|
+
Exclude:
|
46
|
+
- lib/yoti/util/anchor_processor.rb
|
47
|
+
|
48
|
+
Naming/PredicateName:
|
49
|
+
Exclude:
|
50
|
+
- lib/yoti/util/age_processor.rb
|
data/yoti.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path('
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require 'yoti/version'
|
4
4
|
|
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
|
|
23
23
|
|
24
24
|
spec.required_ruby_version = '>= 2.4'
|
25
25
|
|
26
|
+
spec.add_dependency 'google-protobuf', '~> 3.7.0'
|
26
27
|
spec.add_dependency 'protobuf', '~> 3.6'
|
27
|
-
spec.add_dependency 'google-protobuf', '~> 3.6.1'
|
28
28
|
|
29
|
-
spec.add_development_dependency 'bundler', '~>
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
30
|
spec.add_development_dependency 'dotenv', '~> 2.2'
|
31
31
|
spec.add_development_dependency 'generator_spec', '~> 0.9'
|
32
32
|
spec.add_development_dependency 'rake', '~> 12.0'
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoti
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.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:
|
11
|
+
date: 2019-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: protobuf
|
14
|
+
name: google-protobuf
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 3.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 3.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: protobuf
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.6
|
33
|
+
version: '3.6'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.6
|
40
|
+
version: '3.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: dotenv
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -175,6 +175,7 @@ extensions: []
|
|
175
175
|
extra_rdoc_files: []
|
176
176
|
files:
|
177
177
|
- ".gitignore"
|
178
|
+
- ".travis.yml"
|
178
179
|
- CONTRIBUTING.md
|
179
180
|
- Gemfile
|
180
181
|
- Guardfile
|
@@ -189,6 +190,10 @@ files:
|
|
189
190
|
- lib/yoti/configuration.rb
|
190
191
|
- lib/yoti/data_type/anchor.rb
|
191
192
|
- lib/yoti/data_type/attribute.rb
|
193
|
+
- lib/yoti/data_type/image.rb
|
194
|
+
- lib/yoti/data_type/image_jpeg.rb
|
195
|
+
- lib/yoti/data_type/image_png.rb
|
196
|
+
- lib/yoti/data_type/multi_value.rb
|
192
197
|
- lib/yoti/data_type/profile.rb
|
193
198
|
- lib/yoti/data_type/signed_time_stamp.rb
|
194
199
|
- lib/yoti/errors.rb
|
@@ -198,20 +203,17 @@ files:
|
|
198
203
|
- lib/yoti/http/profile_request.rb
|
199
204
|
- lib/yoti/http/request.rb
|
200
205
|
- lib/yoti/http/signed_request.rb
|
201
|
-
- lib/yoti/protobuf/
|
202
|
-
- lib/yoti/protobuf/
|
203
|
-
- lib/yoti/protobuf/
|
204
|
-
- lib/yoti/protobuf/
|
205
|
-
- lib/yoti/protobuf/
|
206
|
+
- lib/yoti/protobuf/attrpubapi/Attribute_pb.rb
|
207
|
+
- lib/yoti/protobuf/attrpubapi/ContentType_pb.rb
|
208
|
+
- lib/yoti/protobuf/attrpubapi/List_pb.rb
|
209
|
+
- lib/yoti/protobuf/attrpubapi/Signing_pb.rb
|
210
|
+
- lib/yoti/protobuf/compubapi/EncryptedData_pb.rb
|
211
|
+
- lib/yoti/protobuf/compubapi/SignedTimestamp_pb.rb
|
206
212
|
- lib/yoti/protobuf/main.rb
|
207
|
-
- lib/yoti/protobuf/v3/attrpubapi/attribute_pb.rb
|
208
|
-
- lib/yoti/protobuf/v3/attrpubapi/list_pb.rb
|
209
|
-
- lib/yoti/protobuf/v3/attrpubapi/signing_pb.rb
|
210
|
-
- lib/yoti/protobuf/v3/compubapi/encrypted_data_pb.rb
|
211
|
-
- lib/yoti/protobuf/v3/compubapi/signed_time_stamp_pb.rb
|
212
213
|
- lib/yoti/ssl.rb
|
213
214
|
- lib/yoti/util/age_processor.rb
|
214
215
|
- lib/yoti/util/anchor_processor.rb
|
216
|
+
- lib/yoti/util/log.rb
|
215
217
|
- lib/yoti/version.rb
|
216
218
|
- login_flow.png
|
217
219
|
- rubocop.yml
|
@@ -236,8 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
236
238
|
- !ruby/object:Gem::Version
|
237
239
|
version: '0'
|
238
240
|
requirements: []
|
239
|
-
|
240
|
-
rubygems_version: 2.7.6
|
241
|
+
rubygems_version: 3.0.3
|
241
242
|
signing_key:
|
242
243
|
specification_version: 4
|
243
244
|
summary: Yoti Ruby SDK for back-end integration.
|
@@ -1,52 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package Yoti.Protobuf.attrpubapi_v3;
|
4
|
-
|
5
|
-
option java_package = "com.yoti.attrpubapi_v3";
|
6
|
-
option java_outer_classname = "AttrProto";
|
7
|
-
|
8
|
-
|
9
|
-
// ContentType indicates how to interpret the ‘Value’ field of an Attribute.
|
10
|
-
enum ContentType {
|
11
|
-
// UNDEFINED should not be seen, and is used as an error placeholder
|
12
|
-
// value.
|
13
|
-
UNDEFINED = 0;
|
14
|
-
|
15
|
-
// STRING means the value is UTF-8 encoded text.
|
16
|
-
STRING = 1;
|
17
|
-
|
18
|
-
// JPEG indicates a standard .jpeg image.
|
19
|
-
JPEG = 2;
|
20
|
-
|
21
|
-
// Date as string in RFC3339 format (YYYY-MM-DD).
|
22
|
-
DATE = 3;
|
23
|
-
|
24
|
-
// PNG indicates a standard .png image.
|
25
|
-
PNG = 4;
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
message Attribute {
|
30
|
-
string name = 1;
|
31
|
-
|
32
|
-
bytes value = 2;
|
33
|
-
|
34
|
-
ContentType content_type = 3;
|
35
|
-
|
36
|
-
repeated Anchor anchors = 4;
|
37
|
-
}
|
38
|
-
|
39
|
-
|
40
|
-
message Anchor {
|
41
|
-
bytes artifact_link = 1;
|
42
|
-
|
43
|
-
repeated bytes origin_server_certs = 2;
|
44
|
-
|
45
|
-
bytes artifact_signature = 3;
|
46
|
-
|
47
|
-
string sub_type = 4;
|
48
|
-
|
49
|
-
bytes signature = 5;
|
50
|
-
|
51
|
-
bytes signed_time_stamp = 6;
|
52
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package Yoti.Protobuf.attrpubapi_v3;
|
4
|
-
|
5
|
-
import "Attribute.proto";
|
6
|
-
|
7
|
-
option java_package = "com.yoti.attrpubapi_v3";
|
8
|
-
option java_outer_classname = "AttrProto";
|
9
|
-
|
10
|
-
|
11
|
-
// AttributeAndId is a simple container for holding an attribute's value
|
12
|
-
// alongside its ID.
|
13
|
-
message AttributeAndId {
|
14
|
-
Attribute attribute = 1;
|
15
|
-
|
16
|
-
bytes attribute_id = 2;
|
17
|
-
}
|
18
|
-
|
19
|
-
|
20
|
-
message AttributeAndIdList {
|
21
|
-
repeated AttributeAndId attribute_and_id_list = 1;
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
message AttributeList {
|
26
|
-
repeated Attribute attributes = 1;
|
27
|
-
}
|
@@ -1,23 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package Yoti.Protobuf.attrpubapi_v3;
|
4
|
-
|
5
|
-
import "Attribute.proto";
|
6
|
-
|
7
|
-
option java_package = "com.yoti.attrpubapi_v3";
|
8
|
-
option java_outer_classname = "AttrProto";
|
9
|
-
|
10
|
-
|
11
|
-
message AttributeSigning {
|
12
|
-
string name = 1;
|
13
|
-
|
14
|
-
bytes value = 2;
|
15
|
-
|
16
|
-
ContentType content_type = 3;
|
17
|
-
|
18
|
-
bytes artifact_signature = 4;
|
19
|
-
|
20
|
-
string sub_type = 5;
|
21
|
-
|
22
|
-
bytes signed_time_stamp = 6;
|
23
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
syntax = "proto3";
|
2
|
-
|
3
|
-
package Yoti.Protobuf.compubapi_v3;
|
4
|
-
|
5
|
-
option java_package = "com.yoti.compubapi_v3";
|
6
|
-
option java_outer_classname = "EncryptedDataProto";
|
7
|
-
|
8
|
-
message EncryptedData {
|
9
|
-
// the iv will be used in conjunction with the secret key
|
10
|
-
// received via other channel in order to decrypt the cipher_text
|
11
|
-
bytes iv = 1;
|
12
|
-
|
13
|
-
// block of bytes to be decrypted
|
14
|
-
bytes cipher_text = 2;
|
15
|
-
}
|