trinsic_api 3.2.1 → 3.3.0.pre.alpha2
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/docs/BrazilCnhProviderOutput.md +2 -0
- data/docs/BrazilCpfCheckInput.md +3 -3
- data/docs/BrazilCpfProviderOutput.md +1 -1
- data/docs/BrazilDigitalCnhInput.md +1 -1
- data/docs/ConnectIdAgeVerification.md +9 -1
- data/docs/ConnectIdInput.md +18 -0
- data/docs/CreateDirectProviderSessionRequest.md +2 -0
- data/docs/CreateHostedProviderSessionRequest.md +2 -0
- data/docs/CzechBankIdInput.md +18 -0
- data/docs/DeveloperApi.md +153 -0
- data/docs/DigilockerAadhaarProviderOutput.md +1 -1
- data/docs/FinnishTrustNetworkAddressOutput.md +22 -0
- data/docs/FinnishTrustNetworkInput.md +18 -0
- data/docs/FinnishTrustNetworkProviderOutput.md +2 -0
- data/docs/GetAttachmentResponse.md +2 -0
- data/docs/GetSessionResultRequest.md +3 -1
- data/docs/GetSessionResultResponse.md +3 -1
- data/docs/HPKETestRequest.md +22 -0
- data/docs/HPKETestVPRequest.md +20 -0
- data/docs/IdemiaMobileIdProviderOutput.md +1 -5
- data/docs/IndiaPanLookupProviderOutput.md +1 -1
- data/docs/IndonesiaDukcapilMatchInput.md +1 -1
- data/docs/JapanMyNumberProviderOutput.md +24 -0
- data/docs/JordanSanadInput.md +18 -0
- data/docs/MitIdAddressOutput.md +28 -0
- data/docs/MitIdProviderOutput.md +3 -1
- data/docs/PolandMobywatelMatchInput.md +1 -1
- data/docs/Provider.md +2 -0
- data/docs/ProviderInput.md +10 -0
- data/docs/ProviderOutput.md +8 -0
- data/docs/RecommendProviderInformation.md +2 -0
- data/docs/RecommendProvidersRequest.md +1 -1
- data/docs/RevolutProviderOutput.md +28 -0
- data/docs/SanadProviderOutput.md +28 -0
- data/docs/SaudiArabiaNafathAddress.md +50 -0
- data/docs/SaudiArabiaNafathCitizenAttributes.md +68 -0
- data/docs/SaudiArabiaNafathHeadOfHousehold.md +26 -0
- data/docs/SaudiArabiaNafathProviderOutput.md +38 -0
- data/docs/SaudiArabiaNafathResidentAttributes.md +68 -0
- data/docs/SaudiArabiaNafathVisitorAttributes.md +72 -0
- data/docs/SessionsApi.md +2 -2
- data/docs/SignzyIndiaAadhaarFetchProviderOutput.md +1 -1
- data/docs/SingpassPersonalCatalog.md +2 -2
- data/docs/SwedenBankIdProviderOutput.md +7 -3
- data/docs/TrinsicHPKEBundle.md +24 -0
- data/docs/TrinsicHPKEMetadata.md +30 -0
- data/docs/TrinsicTestDatabaseLookupInput.md +1 -1
- data/docs/UkEvisaLookupInput.md +1 -1
- data/docs/UsaArizonaWalletInput.md +18 -0
- data/docs/VerificationProfileResponse.md +2 -0
- data/docs/VerificationProfilesApi.md +3 -1
- data/docs/YotiStructuredPostalAddress.md +1 -1
- data/lib/trinsic_api/api/developer_api.rb +156 -0
- data/lib/trinsic_api/api/verification_profiles_api.rb +3 -0
- data/lib/trinsic_api/api_client.rb +1 -0
- data/lib/trinsic_api/models/brazil_cnh_provider_output.rb +12 -1
- data/lib/trinsic_api/models/brazil_cpf_check_input.rb +12 -22
- data/lib/trinsic_api/models/brazil_cpf_provider_output.rb +1 -1
- data/lib/trinsic_api/models/brazil_digital_cnh_input.rb +1 -1
- data/lib/trinsic_api/models/connect_id_age_verification.rb +46 -2
- data/lib/trinsic_api/models/connect_id_input.rb +149 -0
- data/lib/trinsic_api/models/create_direct_provider_session_request.rb +28 -1
- data/lib/trinsic_api/models/create_hosted_provider_session_request.rb +28 -1
- data/lib/trinsic_api/models/czech_bank_id_input.rb +149 -0
- data/lib/trinsic_api/models/digilocker_aadhaar_provider_output.rb +1 -1
- data/lib/trinsic_api/models/finnish_trust_network_address_output.rb +171 -0
- data/lib/trinsic_api/models/finnish_trust_network_input.rb +149 -0
- data/lib/trinsic_api/models/finnish_trust_network_provider_output.rb +12 -1
- data/lib/trinsic_api/models/get_attachment_response.rb +12 -1
- data/lib/trinsic_api/models/get_session_result_request.rb +15 -4
- data/lib/trinsic_api/models/get_session_result_response.rb +16 -5
- data/lib/trinsic_api/models/hpke_test_request.rb +219 -0
- data/lib/trinsic_api/models/hpke_test_vp_request.rb +192 -0
- data/lib/trinsic_api/models/idemia_mobile_id_provider_output.rb +1 -23
- data/lib/trinsic_api/models/india_pan_lookup_provider_output.rb +1 -1
- data/lib/trinsic_api/models/indonesia_dukcapil_match_input.rb +1 -1
- data/lib/trinsic_api/models/japan_my_number_provider_output.rb +183 -0
- data/lib/trinsic_api/models/jordan_sanad_input.rb +164 -0
- data/lib/trinsic_api/models/mit_id_address_output.rb +204 -0
- data/lib/trinsic_api/models/mit_id_provider_output.rb +16 -5
- data/lib/trinsic_api/models/poland_mobywatel_match_input.rb +1 -1
- data/lib/trinsic_api/models/provider.rb +14 -1
- data/lib/trinsic_api/models/provider_input.rb +56 -1
- data/lib/trinsic_api/models/provider_output.rb +45 -1
- data/lib/trinsic_api/models/recommend_provider_information.rb +14 -1
- data/lib/trinsic_api/models/recommend_providers_request.rb +1 -1
- data/lib/trinsic_api/models/revolut_provider_output.rb +204 -0
- data/lib/trinsic_api/models/sanad_provider_output.rb +205 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_address.rb +325 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_citizen_attributes.rb +426 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_head_of_household.rb +193 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_provider_output.rb +260 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_resident_attributes.rb +426 -0
- data/lib/trinsic_api/models/saudi_arabia_nafath_visitor_attributes.rb +446 -0
- data/lib/trinsic_api/models/signzy_india_aadhaar_fetch_provider_output.rb +1 -1
- data/lib/trinsic_api/models/singpass_personal_catalog.rb +9 -9
- data/lib/trinsic_api/models/sweden_bank_id_provider_output.rb +24 -2
- data/lib/trinsic_api/models/trinsic_hpke_bundle.rb +246 -0
- data/lib/trinsic_api/models/trinsic_hpke_metadata.rb +327 -0
- data/lib/trinsic_api/models/trinsic_test_database_lookup_input.rb +1 -1
- data/lib/trinsic_api/models/uk_evisa_lookup_input.rb +1 -1
- data/lib/trinsic_api/models/usa_arizona_wallet_input.rb +149 -0
- data/lib/trinsic_api/models/verification_profile_response.rb +28 -1
- data/lib/trinsic_api/version.rb +1 -1
- data/lib/trinsic_api.rb +21 -0
- data/spec/api/developer_api_spec.rb +60 -0
- data/spec/api/verification_profiles_api_spec.rb +1 -0
- data/spec/models/brazil_cnh_provider_output_spec.rb +6 -0
- data/spec/models/connect_id_age_verification_spec.rb +24 -0
- data/spec/models/connect_id_input_spec.rb +36 -0
- data/spec/models/create_direct_provider_session_request_spec.rb +6 -0
- data/spec/models/create_hosted_provider_session_request_spec.rb +6 -0
- data/spec/models/czech_bank_id_input_spec.rb +36 -0
- data/spec/models/finnish_trust_network_address_output_spec.rb +48 -0
- data/spec/models/finnish_trust_network_input_spec.rb +36 -0
- data/spec/models/finnish_trust_network_provider_output_spec.rb +6 -0
- data/spec/models/get_attachment_response_spec.rb +6 -0
- data/spec/models/get_session_result_request_spec.rb +6 -0
- data/spec/models/get_session_result_response_spec.rb +6 -0
- data/spec/models/hpke_test_request_spec.rb +48 -0
- data/spec/models/hpke_test_vp_request_spec.rb +42 -0
- data/spec/models/idemia_mobile_id_provider_output_spec.rb +0 -12
- data/spec/models/japan_my_number_provider_output_spec.rb +54 -0
- data/spec/models/jordan_sanad_input_spec.rb +36 -0
- data/spec/models/mit_id_address_output_spec.rb +66 -0
- data/spec/models/mit_id_provider_output_spec.rb +6 -0
- data/spec/models/provider_input_spec.rb +30 -0
- data/spec/models/provider_output_spec.rb +24 -0
- data/spec/models/provider_spec.rb +6 -0
- data/spec/models/recommend_provider_information_spec.rb +6 -0
- data/spec/models/revolut_provider_output_spec.rb +66 -0
- data/spec/models/sanad_provider_output_spec.rb +66 -0
- data/spec/models/saudi_arabia_nafath_address_spec.rb +132 -0
- data/spec/models/saudi_arabia_nafath_citizen_attributes_spec.rb +186 -0
- data/spec/models/saudi_arabia_nafath_head_of_household_spec.rb +60 -0
- data/spec/models/saudi_arabia_nafath_provider_output_spec.rb +96 -0
- data/spec/models/saudi_arabia_nafath_resident_attributes_spec.rb +186 -0
- data/spec/models/saudi_arabia_nafath_visitor_attributes_spec.rb +198 -0
- data/spec/models/singpass_personal_catalog_spec.rb +1 -1
- data/spec/models/sweden_bank_id_provider_output_spec.rb +12 -0
- data/spec/models/trinsic_hpke_bundle_spec.rb +54 -0
- data/spec/models/trinsic_hpke_metadata_spec.rb +72 -0
- data/spec/models/usa_arizona_wallet_input_spec.rb +36 -0
- data/spec/models/verification_profile_response_spec.rb +6 -0
- metadata +375 -291
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrinsicApi
|
|
17
|
+
class TrinsicHPKEBundle < ApiModelBase
|
|
18
|
+
# The version of the Trinsic HPKE Exchange Protocol in use. Always `1` at this time.
|
|
19
|
+
attr_accessor :trinsic_hpke_version
|
|
20
|
+
|
|
21
|
+
# Information about the HPKE parameters in use. Trinsic currently supports a fixed set of HPKE parameters: - Mode: Basic - KEM: DHKEM(P256, HKDF-SHA256) - KDF: HKDF-SHA256 - AEAD: AES-128-GCM
|
|
22
|
+
attr_accessor :metadata
|
|
23
|
+
|
|
24
|
+
# Corresponds to the `enc` parameter of HPKE. The raw bytes, in a format unique to the chosen HPKE KEM, of the ephemeral sender public key for this single-shot HPKE exchange. Because Trinsic only supports DHKEM(P256, HKDF-SHA256), this is always a 65-byte array with the following format: [0x04][XCoord][YCoord] Where [0x04] is a single byte with value `4`, and [XCoord] / [YCoord] are each 32-byte X/Y coordinates of a P-256 public key.
|
|
25
|
+
attr_accessor :ephemeral_sender_public_key
|
|
26
|
+
|
|
27
|
+
# Corresponds to the `ct` parameter of HPKE. The encrypted ciphertext for this HPKE single-shot message. Because Trinsic only supports AES-128-GCM, this byte array always has an exact format: [CipherText][Tag] Where [ciphertext] is a variable-length array of bytes, and [tag] is a 16-length byte array.
|
|
28
|
+
attr_accessor :ciphertext
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'trinsic_hpke_version' => :'trinsicHpkeVersion',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'ephemeral_sender_public_key' => :'ephemeralSenderPublicKey',
|
|
36
|
+
:'ciphertext' => :'ciphertext'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns attribute mapping this model knows about
|
|
41
|
+
def self.acceptable_attribute_map
|
|
42
|
+
attribute_map
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Returns all the JSON keys this model knows about
|
|
46
|
+
def self.acceptable_attributes
|
|
47
|
+
acceptable_attribute_map.values
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Attribute type mapping.
|
|
51
|
+
def self.openapi_types
|
|
52
|
+
{
|
|
53
|
+
:'trinsic_hpke_version' => :'Integer',
|
|
54
|
+
:'metadata' => :'TrinsicHPKEMetadata',
|
|
55
|
+
:'ephemeral_sender_public_key' => :'String',
|
|
56
|
+
:'ciphertext' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::TrinsicHPKEBundle` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
75
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
76
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
77
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::TrinsicHPKEBundle`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
78
|
+
end
|
|
79
|
+
h[k.to_sym] = v
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'trinsic_hpke_version')
|
|
83
|
+
self.trinsic_hpke_version = attributes[:'trinsic_hpke_version']
|
|
84
|
+
else
|
|
85
|
+
self.trinsic_hpke_version = nil
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'metadata')
|
|
89
|
+
self.metadata = attributes[:'metadata']
|
|
90
|
+
else
|
|
91
|
+
self.metadata = nil
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'ephemeral_sender_public_key')
|
|
95
|
+
self.ephemeral_sender_public_key = attributes[:'ephemeral_sender_public_key']
|
|
96
|
+
else
|
|
97
|
+
self.ephemeral_sender_public_key = nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.key?(:'ciphertext')
|
|
101
|
+
self.ciphertext = attributes[:'ciphertext']
|
|
102
|
+
else
|
|
103
|
+
self.ciphertext = nil
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
108
|
+
# @return Array for valid properties with the reasons
|
|
109
|
+
def list_invalid_properties
|
|
110
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
if @trinsic_hpke_version.nil?
|
|
113
|
+
invalid_properties.push('invalid value for "trinsic_hpke_version", trinsic_hpke_version cannot be nil.')
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if @metadata.nil?
|
|
117
|
+
invalid_properties.push('invalid value for "metadata", metadata cannot be nil.')
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @ephemeral_sender_public_key.nil?
|
|
121
|
+
invalid_properties.push('invalid value for "ephemeral_sender_public_key", ephemeral_sender_public_key cannot be nil.')
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @ciphertext.nil?
|
|
125
|
+
invalid_properties.push('invalid value for "ciphertext", ciphertext cannot be nil.')
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
invalid_properties
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Check to see if the all the properties in the model are valid
|
|
132
|
+
# @return true if the model is valid
|
|
133
|
+
def valid?
|
|
134
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
135
|
+
return false if @trinsic_hpke_version.nil?
|
|
136
|
+
return false if @metadata.nil?
|
|
137
|
+
return false if @ephemeral_sender_public_key.nil?
|
|
138
|
+
return false if @ciphertext.nil?
|
|
139
|
+
true
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Custom attribute writer method with validation
|
|
143
|
+
# @param [Object] trinsic_hpke_version Value to be assigned
|
|
144
|
+
def trinsic_hpke_version=(trinsic_hpke_version)
|
|
145
|
+
if trinsic_hpke_version.nil?
|
|
146
|
+
fail ArgumentError, 'trinsic_hpke_version cannot be nil'
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
@trinsic_hpke_version = trinsic_hpke_version
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method with validation
|
|
153
|
+
# @param [Object] metadata Value to be assigned
|
|
154
|
+
def metadata=(metadata)
|
|
155
|
+
if metadata.nil?
|
|
156
|
+
fail ArgumentError, 'metadata cannot be nil'
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
@metadata = metadata
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Custom attribute writer method with validation
|
|
163
|
+
# @param [Object] ephemeral_sender_public_key Value to be assigned
|
|
164
|
+
def ephemeral_sender_public_key=(ephemeral_sender_public_key)
|
|
165
|
+
if ephemeral_sender_public_key.nil?
|
|
166
|
+
fail ArgumentError, 'ephemeral_sender_public_key cannot be nil'
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
@ephemeral_sender_public_key = ephemeral_sender_public_key
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Custom attribute writer method with validation
|
|
173
|
+
# @param [Object] ciphertext Value to be assigned
|
|
174
|
+
def ciphertext=(ciphertext)
|
|
175
|
+
if ciphertext.nil?
|
|
176
|
+
fail ArgumentError, 'ciphertext cannot be nil'
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
@ciphertext = ciphertext
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Checks equality by comparing each attribute.
|
|
183
|
+
# @param [Object] Object to be compared
|
|
184
|
+
def ==(o)
|
|
185
|
+
return true if self.equal?(o)
|
|
186
|
+
self.class == o.class &&
|
|
187
|
+
trinsic_hpke_version == o.trinsic_hpke_version &&
|
|
188
|
+
metadata == o.metadata &&
|
|
189
|
+
ephemeral_sender_public_key == o.ephemeral_sender_public_key &&
|
|
190
|
+
ciphertext == o.ciphertext
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# @see the `==` method
|
|
194
|
+
# @param [Object] Object to be compared
|
|
195
|
+
def eql?(o)
|
|
196
|
+
self == o
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Calculates hash code according to all attributes.
|
|
200
|
+
# @return [Integer] Hash code
|
|
201
|
+
def hash
|
|
202
|
+
[trinsic_hpke_version, metadata, ephemeral_sender_public_key, ciphertext].hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Builds the object from hash
|
|
206
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
207
|
+
# @return [Object] Returns the model itself
|
|
208
|
+
def self.build_from_hash(attributes)
|
|
209
|
+
return nil unless attributes.is_a?(Hash)
|
|
210
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
211
|
+
transformed_hash = {}
|
|
212
|
+
openapi_types.each_pair do |key, type|
|
|
213
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
214
|
+
transformed_hash["#{key}"] = nil
|
|
215
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
216
|
+
# check to ensure the input is an array given that the attribute
|
|
217
|
+
# is documented as an array but the input is not
|
|
218
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
219
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
220
|
+
end
|
|
221
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
222
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
223
|
+
end
|
|
224
|
+
end
|
|
225
|
+
new(transformed_hash)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Returns the object in the form of hash
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_hash
|
|
231
|
+
hash = {}
|
|
232
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
233
|
+
value = self.send(attr)
|
|
234
|
+
if value.nil?
|
|
235
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
236
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
hash[param] = _to_hash(value)
|
|
240
|
+
end
|
|
241
|
+
hash
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Trinsic API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.21.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module TrinsicApi
|
|
17
|
+
class TrinsicHPKEMetadata < ApiModelBase
|
|
18
|
+
# The HPKE mode in use. Trinsic only currently supports the Basic mode. There are four modes defined in the HPKE specification: - Basic (0): Sender is not authenticated - PSK (1): Sender is authenticated by proving possession of a Pre-Shared Key (byte array) which the recipient also knows. - Auth (2): Sender is authenticated by proving possession of a Private Key, for which the recipient knows the corresponding Public Key. - AuthPSK (3): Sender is authenticated by proving possession of both a Pre-Shared Key and a Private Key.
|
|
19
|
+
attr_accessor :mode
|
|
20
|
+
|
|
21
|
+
# The Key Encapsulation Mechanism (KEM) used for the HPKE handshake. Trinsic currently only supports the DHKEM(P256, HKDF-SHA256) KEM, meaning that only P-256 keys are supported.
|
|
22
|
+
attr_accessor :kem
|
|
23
|
+
|
|
24
|
+
# The Key Derivation Function (KDF) used for the HPKE handshake. Trinsic currently only supports HKDF-SHA256.
|
|
25
|
+
attr_accessor :kdf
|
|
26
|
+
|
|
27
|
+
# The symmetric encryption cipher used for ciphertext encryption and decryption. Trinsic currently only supports AES-128-GCM.
|
|
28
|
+
attr_accessor :aead
|
|
29
|
+
|
|
30
|
+
# SHA-256 hash of the `info` parameter used during HPKE encryption. This is not used in HPKE directly. This is provided as a helper for debugging and development purposes, to verify that the same `info` hash is being used by both Trinsic and your integration.
|
|
31
|
+
attr_accessor :info_hash
|
|
32
|
+
|
|
33
|
+
# SHA-256 hash of the recipient's P-256 public key in raw uncompressed point encoding ([0x04][X][Y]). This is not used in HPKE directly. Use this to verify that an HPKE message was encrypted against your public key, and/or to identify which of your keys a message was encrypted against, before proceeding with decryption. This and `recipientPublicKeyJwkThumbprint` are both effectively hashes of the recipient's (your) public key. Either is appropriate to use for the same purpose.
|
|
34
|
+
attr_accessor :recipient_public_key_hash
|
|
35
|
+
|
|
36
|
+
# JWK Thumbprint of the recipient's P-256 public key, in base64url encoding. This is not used in HPKE directly. Use this to verify that an HPKE message was encrypted against your public key, and/or to identify which of your keys a message was encrypted against, before proceeding with decryption. This and `recipientPublicKeyHash` are both effectively hashes of the recipient's (your) public key. Either is appropriate to use for the same purpose.
|
|
37
|
+
attr_accessor :recipient_public_key_jwk_thumbprint
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
:'mode' => :'mode',
|
|
43
|
+
:'kem' => :'kem',
|
|
44
|
+
:'kdf' => :'kdf',
|
|
45
|
+
:'aead' => :'aead',
|
|
46
|
+
:'info_hash' => :'infoHash',
|
|
47
|
+
:'recipient_public_key_hash' => :'recipientPublicKeyHash',
|
|
48
|
+
:'recipient_public_key_jwk_thumbprint' => :'recipientPublicKeyJwkThumbprint'
|
|
49
|
+
}
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Returns attribute mapping this model knows about
|
|
53
|
+
def self.acceptable_attribute_map
|
|
54
|
+
attribute_map
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Returns all the JSON keys this model knows about
|
|
58
|
+
def self.acceptable_attributes
|
|
59
|
+
acceptable_attribute_map.values
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Attribute type mapping.
|
|
63
|
+
def self.openapi_types
|
|
64
|
+
{
|
|
65
|
+
:'mode' => :'Integer',
|
|
66
|
+
:'kem' => :'Integer',
|
|
67
|
+
:'kdf' => :'Integer',
|
|
68
|
+
:'aead' => :'Integer',
|
|
69
|
+
:'info_hash' => :'String',
|
|
70
|
+
:'recipient_public_key_hash' => :'String',
|
|
71
|
+
:'recipient_public_key_jwk_thumbprint' => :'String'
|
|
72
|
+
}
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# List of attributes with nullable: true
|
|
76
|
+
def self.openapi_nullable
|
|
77
|
+
Set.new([
|
|
78
|
+
])
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Initializes the object
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
def initialize(attributes = {})
|
|
84
|
+
if (!attributes.is_a?(Hash))
|
|
85
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::TrinsicHPKEMetadata` initialize method"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
89
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
90
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
91
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
92
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::TrinsicHPKEMetadata`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
93
|
+
end
|
|
94
|
+
h[k.to_sym] = v
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'mode')
|
|
98
|
+
self.mode = attributes[:'mode']
|
|
99
|
+
else
|
|
100
|
+
self.mode = nil
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'kem')
|
|
104
|
+
self.kem = attributes[:'kem']
|
|
105
|
+
else
|
|
106
|
+
self.kem = nil
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'kdf')
|
|
110
|
+
self.kdf = attributes[:'kdf']
|
|
111
|
+
else
|
|
112
|
+
self.kdf = nil
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if attributes.key?(:'aead')
|
|
116
|
+
self.aead = attributes[:'aead']
|
|
117
|
+
else
|
|
118
|
+
self.aead = nil
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'info_hash')
|
|
122
|
+
self.info_hash = attributes[:'info_hash']
|
|
123
|
+
else
|
|
124
|
+
self.info_hash = nil
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
if attributes.key?(:'recipient_public_key_hash')
|
|
128
|
+
self.recipient_public_key_hash = attributes[:'recipient_public_key_hash']
|
|
129
|
+
else
|
|
130
|
+
self.recipient_public_key_hash = nil
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'recipient_public_key_jwk_thumbprint')
|
|
134
|
+
self.recipient_public_key_jwk_thumbprint = attributes[:'recipient_public_key_jwk_thumbprint']
|
|
135
|
+
else
|
|
136
|
+
self.recipient_public_key_jwk_thumbprint = nil
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
141
|
+
# @return Array for valid properties with the reasons
|
|
142
|
+
def list_invalid_properties
|
|
143
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
144
|
+
invalid_properties = Array.new
|
|
145
|
+
if @mode.nil?
|
|
146
|
+
invalid_properties.push('invalid value for "mode", mode cannot be nil.')
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if @kem.nil?
|
|
150
|
+
invalid_properties.push('invalid value for "kem", kem cannot be nil.')
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if @kdf.nil?
|
|
154
|
+
invalid_properties.push('invalid value for "kdf", kdf cannot be nil.')
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if @aead.nil?
|
|
158
|
+
invalid_properties.push('invalid value for "aead", aead cannot be nil.')
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if @info_hash.nil?
|
|
162
|
+
invalid_properties.push('invalid value for "info_hash", info_hash cannot be nil.')
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if @recipient_public_key_hash.nil?
|
|
166
|
+
invalid_properties.push('invalid value for "recipient_public_key_hash", recipient_public_key_hash cannot be nil.')
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if @recipient_public_key_jwk_thumbprint.nil?
|
|
170
|
+
invalid_properties.push('invalid value for "recipient_public_key_jwk_thumbprint", recipient_public_key_jwk_thumbprint cannot be nil.')
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
invalid_properties
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Check to see if the all the properties in the model are valid
|
|
177
|
+
# @return true if the model is valid
|
|
178
|
+
def valid?
|
|
179
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
180
|
+
return false if @mode.nil?
|
|
181
|
+
return false if @kem.nil?
|
|
182
|
+
return false if @kdf.nil?
|
|
183
|
+
return false if @aead.nil?
|
|
184
|
+
return false if @info_hash.nil?
|
|
185
|
+
return false if @recipient_public_key_hash.nil?
|
|
186
|
+
return false if @recipient_public_key_jwk_thumbprint.nil?
|
|
187
|
+
true
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Custom attribute writer method with validation
|
|
191
|
+
# @param [Object] mode Value to be assigned
|
|
192
|
+
def mode=(mode)
|
|
193
|
+
if mode.nil?
|
|
194
|
+
fail ArgumentError, 'mode cannot be nil'
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
@mode = mode
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Custom attribute writer method with validation
|
|
201
|
+
# @param [Object] kem Value to be assigned
|
|
202
|
+
def kem=(kem)
|
|
203
|
+
if kem.nil?
|
|
204
|
+
fail ArgumentError, 'kem cannot be nil'
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
@kem = kem
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Custom attribute writer method with validation
|
|
211
|
+
# @param [Object] kdf Value to be assigned
|
|
212
|
+
def kdf=(kdf)
|
|
213
|
+
if kdf.nil?
|
|
214
|
+
fail ArgumentError, 'kdf cannot be nil'
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
@kdf = kdf
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Custom attribute writer method with validation
|
|
221
|
+
# @param [Object] aead Value to be assigned
|
|
222
|
+
def aead=(aead)
|
|
223
|
+
if aead.nil?
|
|
224
|
+
fail ArgumentError, 'aead cannot be nil'
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
@aead = aead
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Custom attribute writer method with validation
|
|
231
|
+
# @param [Object] info_hash Value to be assigned
|
|
232
|
+
def info_hash=(info_hash)
|
|
233
|
+
if info_hash.nil?
|
|
234
|
+
fail ArgumentError, 'info_hash cannot be nil'
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
@info_hash = info_hash
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Custom attribute writer method with validation
|
|
241
|
+
# @param [Object] recipient_public_key_hash Value to be assigned
|
|
242
|
+
def recipient_public_key_hash=(recipient_public_key_hash)
|
|
243
|
+
if recipient_public_key_hash.nil?
|
|
244
|
+
fail ArgumentError, 'recipient_public_key_hash cannot be nil'
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
@recipient_public_key_hash = recipient_public_key_hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Custom attribute writer method with validation
|
|
251
|
+
# @param [Object] recipient_public_key_jwk_thumbprint Value to be assigned
|
|
252
|
+
def recipient_public_key_jwk_thumbprint=(recipient_public_key_jwk_thumbprint)
|
|
253
|
+
if recipient_public_key_jwk_thumbprint.nil?
|
|
254
|
+
fail ArgumentError, 'recipient_public_key_jwk_thumbprint cannot be nil'
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
@recipient_public_key_jwk_thumbprint = recipient_public_key_jwk_thumbprint
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
# Checks equality by comparing each attribute.
|
|
261
|
+
# @param [Object] Object to be compared
|
|
262
|
+
def ==(o)
|
|
263
|
+
return true if self.equal?(o)
|
|
264
|
+
self.class == o.class &&
|
|
265
|
+
mode == o.mode &&
|
|
266
|
+
kem == o.kem &&
|
|
267
|
+
kdf == o.kdf &&
|
|
268
|
+
aead == o.aead &&
|
|
269
|
+
info_hash == o.info_hash &&
|
|
270
|
+
recipient_public_key_hash == o.recipient_public_key_hash &&
|
|
271
|
+
recipient_public_key_jwk_thumbprint == o.recipient_public_key_jwk_thumbprint
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
# @see the `==` method
|
|
275
|
+
# @param [Object] Object to be compared
|
|
276
|
+
def eql?(o)
|
|
277
|
+
self == o
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Calculates hash code according to all attributes.
|
|
281
|
+
# @return [Integer] Hash code
|
|
282
|
+
def hash
|
|
283
|
+
[mode, kem, kdf, aead, info_hash, recipient_public_key_hash, recipient_public_key_jwk_thumbprint].hash
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# Builds the object from hash
|
|
287
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
288
|
+
# @return [Object] Returns the model itself
|
|
289
|
+
def self.build_from_hash(attributes)
|
|
290
|
+
return nil unless attributes.is_a?(Hash)
|
|
291
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
292
|
+
transformed_hash = {}
|
|
293
|
+
openapi_types.each_pair do |key, type|
|
|
294
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
295
|
+
transformed_hash["#{key}"] = nil
|
|
296
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
297
|
+
# check to ensure the input is an array given that the attribute
|
|
298
|
+
# is documented as an array but the input is not
|
|
299
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
300
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
301
|
+
end
|
|
302
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
303
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
new(transformed_hash)
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Returns the object in the form of hash
|
|
310
|
+
# @return [Hash] Returns the object in the form of hash
|
|
311
|
+
def to_hash
|
|
312
|
+
hash = {}
|
|
313
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
314
|
+
value = self.send(attr)
|
|
315
|
+
if value.nil?
|
|
316
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
317
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
hash[param] = _to_hash(value)
|
|
321
|
+
end
|
|
322
|
+
hash
|
|
323
|
+
end
|
|
324
|
+
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
end
|
|
@@ -24,7 +24,7 @@ module TrinsicApi
|
|
|
24
24
|
# A 6-digit code; must be \"123456\" for the Session to succeed. This is required; if not provided, Trinsic's Fallback UI will be invoked to collect it from the user. Any other value will cause the Session to fail.
|
|
25
25
|
attr_accessor :identity_code
|
|
26
26
|
|
|
27
|
-
# An optional selfie image
|
|
27
|
+
# An optional selfie image in a Base64 string. Will replace the existing test selfie attachment output if provided.
|
|
28
28
|
attr_accessor :selfie_base64
|
|
29
29
|
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module TrinsicApi
|
|
17
17
|
class UkEvisaLookupInput < ApiModelBase
|
|
18
|
-
# The 9-character share code.
|
|
18
|
+
# The 9-character alphanumeric UK Visas and Immigration (UKVI) share code. Must start with W for right to work, R for right to rent, or S for immigration status, matching the configured lookup type. Whitespace is removed and lowercase ASCII letters are converted to uppercase.
|
|
19
19
|
attr_accessor :share_code
|
|
20
20
|
|
|
21
21
|
# The user's date of birth, in `YYYY-MM-DD` format.
|