From f6e72896fec7b148def2c6562e991fcd28e24774 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Thu, 29 Feb 2024 14:04:06 -0500 Subject: [PATCH 1/9] make first pass at removing acuant assureid integration --- app/forms/idv/api_image_upload_form.rb | 1 - .../image_upload_response_presenter.rb | 2 +- app/services/doc_auth/acuant/acuant_client.rb | 68 - app/services/doc_auth/acuant/config.rb | 27 - .../doc_auth/acuant/cropping_modes.rb | 18 - app/services/doc_auth/acuant/issuer_types.rb | 31 - app/services/doc_auth/acuant/pii_from_doc.rb | 56 - app/services/doc_auth/acuant/request.rb | 163 -- .../requests/create_document_request.rb | 82 - .../acuant/requests/get_results_request.rb | 61 - .../acuant/requests/upload_image_request.rb | 67 - .../responses/create_document_response.rb | 14 - .../acuant/responses/get_results_response.rb | 198 -- app/services/doc_auth/acuant/sensor_types.rb | 17 - .../doc_auth/classification_concern.rb | 4 +- app/services/doc_auth/error_generator.rb | 4 +- app/services/doc_auth/issuer_types.rb | 29 + .../lexis_nexis/lexis_nexis_client.rb | 4 - .../doc_auth/mock/doc_auth_mock_client.rb | 17 +- .../responses/create_document_response.rb | 18 - app/services/doc_auth/mock/result_response.rb | 4 +- .../doc_auth/{acuant => }/result_codes.rb | 2 - app/services/doc_auth_router.rb | 16 - .../doc_auth/redo_document_capture_spec.rb | 10 +- .../create_document_response.json | 1 - .../facial_match_response_failure.json | 5 - .../facial_match_response_success.json | 5 - .../get_face_image_response.jpg | Bin 4690 -> 0 bytes .../get_results_response_expired.json | 1555 -------------- .../get_results_response_failure.json | 220 -- .../get_results_response_success.json | 1868 ----------------- ...et_results_response_success_tribal_id.json | 1868 ----------------- .../doc_auth/acuant/acuant_client_spec.rb | 266 --- .../doc_auth/acuant/issuer_types_spec.rb | 15 - .../doc_auth/acuant/pii_from_doc_spec.rb | 42 - spec/services/doc_auth/acuant/request_spec.rb | 223 -- .../requests/create_document_request_spec.rb | 88 - .../requests/get_results_request_spec.rb | 40 - .../requests/upload_image_request_spec.rb | 85 - .../create_document_response_spec.rb | 17 - .../responses/get_results_response_spec.rb | 523 ----- spec/services/doc_auth/issuer_types_spec.rb | 15 + .../lexis_nexis/lexis_nexis_client_spec.rb | 6 - .../mock/doc_auth_mock_client_spec.rb | 38 +- .../doc_auth/mock/result_response_spec.rb | 8 +- .../{acuant => }/result_codes_spec.rb | 8 +- spec/services/doc_auth_router_spec.rb | 9 - spec/support/acuant_fixtures.rb | 20 - spec/support/features/doc_auth_helper.rb | 8 +- spec/support/lexis_nexis_fixtures.rb | 4 + 50 files changed, 94 insertions(+), 7756 deletions(-) delete mode 100644 app/services/doc_auth/acuant/acuant_client.rb delete mode 100644 app/services/doc_auth/acuant/config.rb delete mode 100644 app/services/doc_auth/acuant/cropping_modes.rb delete mode 100644 app/services/doc_auth/acuant/issuer_types.rb delete mode 100644 app/services/doc_auth/acuant/pii_from_doc.rb delete mode 100644 app/services/doc_auth/acuant/request.rb delete mode 100644 app/services/doc_auth/acuant/requests/create_document_request.rb delete mode 100644 app/services/doc_auth/acuant/requests/get_results_request.rb delete mode 100644 app/services/doc_auth/acuant/requests/upload_image_request.rb delete mode 100644 app/services/doc_auth/acuant/responses/create_document_response.rb delete mode 100644 app/services/doc_auth/acuant/responses/get_results_response.rb delete mode 100644 app/services/doc_auth/acuant/sensor_types.rb create mode 100644 app/services/doc_auth/issuer_types.rb delete mode 100644 app/services/doc_auth/mock/responses/create_document_response.rb rename app/services/doc_auth/{acuant => }/result_codes.rb (98%) delete mode 100644 spec/fixtures/acuant_responses/create_document_response.json delete mode 100644 spec/fixtures/acuant_responses/facial_match_response_failure.json delete mode 100644 spec/fixtures/acuant_responses/facial_match_response_success.json delete mode 100644 spec/fixtures/acuant_responses/get_face_image_response.jpg delete mode 100644 spec/fixtures/acuant_responses/get_results_response_expired.json delete mode 100644 spec/fixtures/acuant_responses/get_results_response_failure.json delete mode 100644 spec/fixtures/acuant_responses/get_results_response_success.json delete mode 100644 spec/fixtures/acuant_responses/get_results_response_success_tribal_id.json delete mode 100644 spec/services/doc_auth/acuant/acuant_client_spec.rb delete mode 100644 spec/services/doc_auth/acuant/issuer_types_spec.rb delete mode 100644 spec/services/doc_auth/acuant/pii_from_doc_spec.rb delete mode 100644 spec/services/doc_auth/acuant/request_spec.rb delete mode 100644 spec/services/doc_auth/acuant/requests/create_document_request_spec.rb delete mode 100644 spec/services/doc_auth/acuant/requests/get_results_request_spec.rb delete mode 100644 spec/services/doc_auth/acuant/requests/upload_image_request_spec.rb delete mode 100644 spec/services/doc_auth/acuant/responses/create_document_response_spec.rb delete mode 100644 spec/services/doc_auth/acuant/responses/get_results_response_spec.rb create mode 100644 spec/services/doc_auth/issuer_types_spec.rb rename spec/services/doc_auth/{acuant => }/result_codes_spec.rb (50%) diff --git a/app/forms/idv/api_image_upload_form.rb b/app/forms/idv/api_image_upload_form.rb index 37f2bd30269..e87708823c0 100644 --- a/app/forms/idv/api_image_upload_form.rb +++ b/app/forms/idv/api_image_upload_form.rb @@ -2,7 +2,6 @@ module Idv class ApiImageUploadForm include ActiveModel::Model include ActionView::Helpers::TranslationHelper - include ApplicationHelper validates_presence_of :front validates_presence_of :back diff --git a/app/presenters/image_upload_response_presenter.rb b/app/presenters/image_upload_response_presenter.rb index b524a1f43fe..df63b5fbf1f 100644 --- a/app/presenters/image_upload_response_presenter.rb +++ b/app/presenters/image_upload_response_presenter.rb @@ -66,7 +66,7 @@ def url_options private def doc_auth_result_failed? - @form_response.to_h[:doc_auth_result] == DocAuth::Acuant::ResultCodes::FAILED.name + @form_response.to_h[:doc_auth_result] == DocAuth::ResultCodes::FAILED.name end def show_hints? diff --git a/app/services/doc_auth/acuant/acuant_client.rb b/app/services/doc_auth/acuant/acuant_client.rb deleted file mode 100644 index 3eec6b365f4..00000000000 --- a/app/services/doc_auth/acuant/acuant_client.rb +++ /dev/null @@ -1,68 +0,0 @@ -module DocAuth - module Acuant - class AcuantClient - attr_reader :config - - def initialize(**config_keywords) - @config = Config.new(**config_keywords) - end - - # @see DocAuth::ImageSources - def create_document(image_source:) - raise "unknown image_source=#{image_source}" if !ImageSources::ALL.include?(image_source) - - Requests::CreateDocumentRequest.new(config: config, image_source: image_source).fetch - end - - def post_front_image(image:, instance_id:) - Requests::UploadImageRequest.new( - config: config, - instance_id: instance_id, - image_data: image, - side: :front, - ).fetch - end - - def post_back_image(image:, instance_id:) - Requests::UploadImageRequest.new( - config: config, - instance_id: instance_id, - image_data: image, - side: :back, - ).fetch - end - - def get_results(instance_id:) - Requests::GetResultsRequest.new(config: config, instance_id: instance_id).fetch - end - - # rubocop:disable Lint/UnusedMethodArgument - def post_images( - front_image:, - back_image:, - image_source:, - user_uuid: nil, - uuid_prefix: nil, - selfie_image: nil, - liveness_checking_required: false - ) - document_response = create_document(image_source: image_source) - return document_response unless document_response.success? - - instance_id = document_response.instance_id - - front_image_response = post_front_image(image: front_image, instance_id: instance_id) - return front_image_response unless front_image_response.success? - - back_image_response = post_back_image(image: back_image, instance_id: instance_id) - return back_image_response unless back_image_response.success? - - results_response = get_results(instance_id: instance_id) - return results_response unless results_response.success? - - results_response - end - # rubocop:enable Lint/UnusedMethodArgument - end - end -end diff --git a/app/services/doc_auth/acuant/config.rb b/app/services/doc_auth/acuant/config.rb deleted file mode 100644 index 099e61060f2..00000000000 --- a/app/services/doc_auth/acuant/config.rb +++ /dev/null @@ -1,27 +0,0 @@ -module DocAuth - module Acuant - Config = RedactedStruct.new( - :assure_id_password, - :assure_id_subscription_id, - :assure_id_url, - :assure_id_username, - :facial_match_url, - :passlive_url, - :dpi_threshold, - :sharpness_threshold, - :glare_threshold, - :warn_notifier, - keyword_init: true, - allowed_members: [ - :assure_id_subscription_id, - :assure_id_url, - :facial_match_url, - :passlive_url, - :dpi_threshold, - :sharpness_threshold, - :glare_threshold, - :warn_notifier, - ], - ) - end -end diff --git a/app/services/doc_auth/acuant/cropping_modes.rb b/app/services/doc_auth/acuant/cropping_modes.rb deleted file mode 100644 index 859bdb2b9bb..00000000000 --- a/app/services/doc_auth/acuant/cropping_modes.rb +++ /dev/null @@ -1,18 +0,0 @@ -module DocAuth - module Acuant - module CroppingModes - # No cropping is performed (default). - NONE = '0'.freeze - # Automatically determine whether cropping is required. Not recommended. - AUTOMATIC = '1'.freeze - # Cropping is always performed. - ALWAYS = '3'.freeze - - ALL = [ - NONE, - AUTOMATIC, - ALWAYS, - ].freeze - end - end -end diff --git a/app/services/doc_auth/acuant/issuer_types.rb b/app/services/doc_auth/acuant/issuer_types.rb deleted file mode 100644 index 94d5ee77126..00000000000 --- a/app/services/doc_auth/acuant/issuer_types.rb +++ /dev/null @@ -1,31 +0,0 @@ -module DocAuth - module Acuant - module IssuerTypes - IssuerType = Struct.new(:code, :name) - - UNKNOWN = IssuerType.new(0, 'Unknown').freeze - COUNTRY = IssuerType.new(1, 'Country').freeze - STATE_OR_PROVINCE = IssuerType.new(2, 'StateProvince').freeze - TRIBAL = IssuerType.new(3, 'Tribal').freeze - MUNICIPALITY = IssuerType.new(4, 'Municipality').freeze - BUSINESS = IssuerType.new(5, 'Business').freeze - OTHER = IssuerType.new(6, 'Other').freeze - - ALL = [ - UNKNOWN, - COUNTRY, - STATE_OR_PROVINCE, - TRIBAL, - MUNICIPALITY, - BUSINESS, - OTHER, - ].freeze - - BY_CODE = ALL.index_by(&:code).freeze - - def self.from_int(code) - BY_CODE[code] - end - end - end -end diff --git a/app/services/doc_auth/acuant/pii_from_doc.rb b/app/services/doc_auth/acuant/pii_from_doc.rb deleted file mode 100644 index 60c08afd91c..00000000000 --- a/app/services/doc_auth/acuant/pii_from_doc.rb +++ /dev/null @@ -1,56 +0,0 @@ -module DocAuth - module Acuant - class PiiFromDoc - VALUE = { - 'First Name' => :first_name, - 'Middle Name' => :middle_name, - 'Surname' => :last_name, - 'Address Line 1' => :address1, - 'Address Line 2' => :address2, - 'Address City' => :city, - 'Address State' => :state, - 'Address Postal Code' => :zipcode, - 'Birth Date' => :dob, - 'Document Number' => :state_id_number, - 'Issuing State Code' => :state_id_jurisdiction, - 'Expiration Date' => :state_id_expiration, - 'Issue Date' => :state_id_issued, - 'Document Class Name' => :state_id_type, - }.freeze - - def initialize(id_data_fields) - @name_to_value = {} - id_data_fields['Fields'].each do |field| - @name_to_value[field['Name']] = field['Value'] - end - end - - def call - VALUE.each do |key, value| - hash[value] = @name_to_value[key] - end - hash[:state_id_type] = DocAuth::Response::ID_TYPE_SLUGS[hash[:state_id_type]] - hash[:dob] = convert_date(hash[:dob]) - hash[:state_id_expiration] = convert_date(hash[:state_id_expiration]) - hash[:state_id_issued] = convert_date(hash[:state_id_issued]) - hash - end - - ACUANT_TIMESTAMP_FORMAT = %r{/Date\((?-?\d+)\)/} - - # @api private - def convert_date(date) - match = ACUANT_TIMESTAMP_FORMAT.match(date) - return if !match || !match[:milliseconds] - - Time.zone.at(match[:milliseconds].to_f / 1000).utc.to_date.to_s - end - - private - - def hash - @hash ||= {} - end - end - end -end diff --git a/app/services/doc_auth/acuant/request.rb b/app/services/doc_auth/acuant/request.rb deleted file mode 100644 index 852dd66c05c..00000000000 --- a/app/services/doc_auth/acuant/request.rb +++ /dev/null @@ -1,163 +0,0 @@ -module DocAuth - module Acuant - # https://documentation.help/AssureID-Connect/Error%20Codes.html - # 438, 439, and 440 are frequent errors that we do not want to be notified of - HANDLED_HTTP_CODES = Set[438, 439, 440] - - class Request - attr_reader :config - - def initialize(config:) - @config = config - end - - def path - raise NotImplementedError - end - - def body - raise NotImplementedError - end - - def metric_name - raise NotImplementedError - end - - def handle_http_response(_response) - raise NotImplementedError - end - - def method - :get - end - - def url - URI.join(config.assure_id_url, path) - end - - def headers - { - 'Accept' => 'application/json', - } - end - - def fetch - http_response = send_http_request - - if http_response.success? - handle_http_response(http_response) - elsif HANDLED_HTTP_CODES.include?(http_response.status) - handle_expected_http_error(http_response) - else - handle_invalid_response(http_response) - end - rescue Faraday::ConnectionFailed, Faraday::TimeoutError => e - handle_connection_error(e) - end - - private - - def send_http_request - case method.downcase.to_sym - when :post - send_http_post_request - when :get - send_http_get_request - end - end - - def send_http_get_request - faraday_connection.get do |req| - req.options.context = { service_name: metric_name } - end - end - - def send_http_post_request - faraday_connection.post do |req| - req.options.context = { service_name: metric_name } - req.body = body - end - end - - def faraday_connection - retry_options = { - max: 2, - interval: 0.05, - interval_randomness: 0.5, - backoff_factor: 2, - retry_statuses: [404], - retry_block: lambda do |env:, options:, retry_count:, exception:, will_retry_in:| - send_exception_notification(exception, custom_params: { retry: retry_count }) - end, - } - - Faraday.new(url: url.to_s, headers: headers) do |conn| - conn.request :authorization, :basic, config.assure_id_username, config.assure_id_password - conn.request :instrumentation, name: 'request_metric.faraday' - conn.request :retry, retry_options - conn.adapter :net_http - - conn.options.timeout = timeout - conn.options.read_timeout = timeout - conn.options.open_timeout = timeout - conn.options.write_timeout = timeout - end - end - - def timeout - IdentityConfig.store.acuant_timeout - end - - def create_http_exception(http_response) - message = [ - self.class.name, - 'Unexpected HTTP response', - http_response.status, - ].join(' ') - DocAuth::RequestError.new(message, http_response.status) - end - - def create_error_response(errors, exception) - DocAuth::Response.new( - success: false, - errors: errors, - exception: exception, - extra: { vendor: 'Acuant' }, - ) - end - - def handle_expected_http_error(http_response) - errors = errors_from_http_status(http_response.status) - create_error_response(errors, create_http_exception(http_response)) - end - - def errors_from_http_status(status) - error = case status - when 438 - Errors::IMAGE_LOAD_FAILURE - when 439 - Errors::PIXEL_DEPTH_FAILURE - when 440 - Errors::IMAGE_SIZE_FAILURE - end - { general: [error] } - end - - def handle_invalid_response(http_response) - exception = create_http_exception(http_response) - handle_connection_error(exception) - end - - def handle_connection_error(exception) - send_exception_notification(exception) - create_error_response({ network: true }, exception) - end - - def send_exception_notification(exception, custom_params = {}) - return if exception.is_a?(DocAuth::RequestError) && - HANDLED_HTTP_CODES.include?(exception.error_code) - NewRelic::Agent.notice_error(exception, custom_params) - end - end - end -end diff --git a/app/services/doc_auth/acuant/requests/create_document_request.rb b/app/services/doc_auth/acuant/requests/create_document_request.rb deleted file mode 100644 index b5a8c4bf207..00000000000 --- a/app/services/doc_auth/acuant/requests/create_document_request.rb +++ /dev/null @@ -1,82 +0,0 @@ -module DocAuth - module Acuant - module Requests - class CreateDocumentRequest < DocAuth::Acuant::Request - def initialize(config:, image_source:) - super(config: config) - - # @see DocAuth::ImageSources - @image_source = image_source - end - - def path - '/AssureIDService/Document/Instance' - end - - def headers - super.merge('Content-Type' => 'application/json') - end - - def body - { - AuthenticationSensitivity: 0, - ClassificationMode: 0, - Device: { - HasContactlessChipReader: false, - HasMagneticStripeReader: false, - SerialNumber: 'xxxxx', - Type: { - Manufacturer: 'Login.gov', - Model: 'Doc Auth 1.0', - SensorType: sensor_type, - }, - }, - ImageCroppingExpectedSize: '1', - ImageCroppingMode: cropping_mode, - ManualDocumentType: nil, - ProcessMode: 0, - SubscriptionId: config.assure_id_subscription_id, - }.to_json - end - - def handle_http_response(response) - DocAuth::Acuant::Responses::CreateDocumentResponse.new(response) - end - - def method - :post - end - - def metric_name - 'acuant_doc_auth_create_document' - end - - def timeout - IdentityConfig.store.acuant_create_document_timeout - end - - private - - def acuant_sdk_source? - @image_source == ImageSources::ACUANT_SDK - end - - def cropping_mode - if acuant_sdk_source? - CroppingModes::NONE - else - CroppingModes::ALWAYS - end - end - - def sensor_type - if acuant_sdk_source? - SensorTypes::MOBILE - else - SensorTypes::UNKNOWN - end - end - end - end - end -end diff --git a/app/services/doc_auth/acuant/requests/get_results_request.rb b/app/services/doc_auth/acuant/requests/get_results_request.rb deleted file mode 100644 index a4d7bd7983a..00000000000 --- a/app/services/doc_auth/acuant/requests/get_results_request.rb +++ /dev/null @@ -1,61 +0,0 @@ -module DocAuth - module Acuant - module Requests - class GetResultsRequest < DocAuth::Acuant::Request - attr_reader :instance_id - - def initialize(config:, instance_id:) - super(config: config) - @instance_id = instance_id - end - - def path - "/AssureIDService/Document/#{instance_id}" - end - - def headers - super.merge('Content-Type' => 'application/json') - end - - def handle_http_response(http_response) - DocAuth::Acuant::Responses::GetResultsResponse.new(http_response, config) - end - - def method - :get - end - - def metric_name - 'acuant_doc_auth_get_results' - end - - def timeout - IdentityConfig.store.acuant_get_results_timeout - end - - def errors_from_http_status(status) - case status - when 438 - { - general: [Errors::IMAGE_LOAD_FAILURE], - front: [Errors::IMAGE_LOAD_FAILURE_FIELD], - back: [Errors::IMAGE_LOAD_FAILURE_FIELD], - } - when 439 - { - general: [Errors::PIXEL_DEPTH_FAILURE], - front: [Errors::PIXEL_DEPTH_FAILURE_FIELD], - back: [Errors::PIXEL_DEPTH_FAILURE_FIELD], - } - when 440 - { - general: [Errors::IMAGE_SIZE_FAILURE], - front: [Errors::IMAGE_SIZE_FAILURE_FIELD], - back: [Errors::IMAGE_SIZE_FAILURE_FIELD], - } - end - end - end - end - end -end diff --git a/app/services/doc_auth/acuant/requests/upload_image_request.rb b/app/services/doc_auth/acuant/requests/upload_image_request.rb deleted file mode 100644 index cd597738e86..00000000000 --- a/app/services/doc_auth/acuant/requests/upload_image_request.rb +++ /dev/null @@ -1,67 +0,0 @@ -module DocAuth - module Acuant - module Requests - class UploadImageRequest < DocAuth::Acuant::Request - attr_reader :image_data, :instance_id, :side - - def initialize(config:, image_data:, instance_id:, side:) - super(config: config) - @image_data = image_data - @instance_id = instance_id - @side = side - end - - def path - "/AssureIDService/Document/#{instance_id}/Image?side=#{side_param}&light=0" - end - - def body - image_data - end - - def side_param - { - front: 0, - back: 1, - }[side.downcase.to_sym] - end - - def handle_http_response(_response) - DocAuth::Response.new(success: true) - end - - def method - :post - end - - def metric_name - 'acuant_doc_auth_upload_image' - end - - def timeout - IdentityConfig.store.acuant_upload_image_timeout - end - - def errors_from_http_status(status) - case status - when 438 - { - general: [Errors::IMAGE_LOAD_FAILURE], - side.downcase.to_sym => [Errors::IMAGE_LOAD_FAILURE_FIELD], - } - when 439 - { - general: [Errors::PIXEL_DEPTH_FAILURE], - side.downcase.to_sym => [Errors::PIXEL_DEPTH_FAILURE_FIELD], - } - when 440 - { - general: [Errors::IMAGE_SIZE_FAILURE], - side.downcase.to_sym => [Errors::IMAGE_SIZE_FAILURE_FIELD], - } - end - end - end - end - end -end diff --git a/app/services/doc_auth/acuant/responses/create_document_response.rb b/app/services/doc_auth/acuant/responses/create_document_response.rb deleted file mode 100644 index df3b7ada2cf..00000000000 --- a/app/services/doc_auth/acuant/responses/create_document_response.rb +++ /dev/null @@ -1,14 +0,0 @@ -module DocAuth - module Acuant - module Responses - class CreateDocumentResponse < DocAuth::Response - attr_reader :instance_id - - def initialize(http_response) - @instance_id = JSON.parse(http_response.body) - super(success: true) - end - end - end - end -end diff --git a/app/services/doc_auth/acuant/responses/get_results_response.rb b/app/services/doc_auth/acuant/responses/get_results_response.rb deleted file mode 100644 index f66393da95d..00000000000 --- a/app/services/doc_auth/acuant/responses/get_results_response.rb +++ /dev/null @@ -1,198 +0,0 @@ -module DocAuth - module Acuant - module Responses - class GetResultsResponse < DocAuth::Response - include ClassificationConcern - include SelfieConcern - attr_reader :config - - BARCODE_COULD_NOT_BE_READ_ERROR = '2D Barcode Read'.freeze - - def initialize(http_response, config) - @http_response = http_response - @config = config - super( - success: successful_result?, - errors: generate_errors, - extra: response_info, - ) - end - - # @return [DocAuth::Acuant::ResultCode::ResultCode] - def result_code - DocAuth::Acuant::ResultCodes.from_int(parsed_response_body['Result']) - end - - def tamper_result_code - # TamperResult uses the same Acuant Enum as Result - DocAuth::Acuant::ResultCodes.from_int(parsed_response_body&.dig('TamperResult')) - end - - def pii_from_doc - DocAuth::Acuant::PiiFromDoc.new(parsed_response_body).call - end - - def attention_with_barcode? - return false unless result_code == DocAuth::Acuant::ResultCodes::ATTENTION - - raw_alerts.all? do |alert| - alert_result_code = DocAuth::Acuant::ResultCodes.from_int(alert['Result']) - - alert_result_code == DocAuth::Acuant::ResultCodes::PASSED || - (alert_result_code == DocAuth::Acuant::ResultCodes::ATTENTION && - alert['Key'] == BARCODE_COULD_NOT_BE_READ_ERROR) - end - end - - def doc_auth_success? - passed_result? - end - - private - - attr_reader :http_response - - def response_info - @response_info ||= create_response_info - end - - def create_response_info - alerts = processed_alerts - - log_alert_formatter = DocAuth::ProcessedAlertToLogAlertFormatter.new - - { - vendor: 'Acuant', - billed: result_code.billed, - doc_auth_result: result_code.name, - processed_alerts: alerts, - alert_failure_count: alerts[:failed]&.count.to_i, - log_alert_results: log_alert_formatter.log_alerts(alerts), - image_metrics: processed_image_metrics, - tamper_result: tamper_result_code&.name, - classification_info: classification_info, - address_line2_present: !pii_from_doc[:address2].blank?, - doc_auth_success: doc_auth_success?, - selfie_status: :not_processed, - } - end - - def generate_errors - return {} if successful_result? - - ErrorGenerator.new(config).generate_doc_auth_errors(response_info) - end - - def parsed_response_body - @parsed_response_body ||= JSON.parse(http_response.body) - end - - def raw_alerts - parsed_response_body['Alerts'] || [] - end - - def raw_regions - parsed_response_body['Regions'] || [] - end - - def regions_by_id - @regions_by_id ||= raw_regions.index_by { |region| region['Id'] } - end - - def raw_images_data - parsed_response_body['Images'] || [] - end - - def processed_alerts - @processed_alerts ||= process_raw_alerts(raw_alerts) - end - - def processed_image_metrics - @processed_image_metrics ||= raw_images_data.index_by do |image| - image.delete('Uri') - get_image_side_name(image['Side']) - end - end - - def classification_info - classification_details = parsed_response_body.dig( - 'Classification', 'ClassificationDetails' - ) - return unless classification_details.present? - - classification_details.transform_values do |classification_detail| - detail = classification_detail.slice( - 'ClassName', - 'Issue', - 'IssueType', - 'Name', - 'IssuerCode', - 'IssuerName', - 'CountryCode', - 'IssuerType', - ) - # code to value - detail['IssuerType'] = DocAuth::Acuant::IssuerTypes.from_int(detail['IssuerType']).name - detail - end.deep_symbolize_keys - end - - def successful_result? - (passed_result? || attention_with_barcode?) && id_type_supported? - end - - def passed_result? - result_code == DocAuth::Acuant::ResultCodes::PASSED - end - - # This is not implemented for the acuant call since that is currently not in use - def portrait_match_results - return {} - end - - def get_image_side_name(side_number) - side_number == 0 ? :front : :back - end - - def get_image_info(image_id) - @images_by_id ||= raw_images_data.index_by { |image| image['Id'] } - - @images_by_id[image_id] - end - - def get_region_info(region_ids) - region = regions_by_id[region_ids.first] - image = get_image_info(region['ImageReference']) - - { - region: region['Key'], - side: get_image_side_name(image['Side']), - } - end - - def process_raw_alerts(alerts) - processed_alerts = { passed: [], failed: [] } - alerts.each do |raw_alert| - region_refs = raw_alert['RegionReferences'] - result_code = DocAuth::Acuant::ResultCodes.from_int(raw_alert['Result']) - - new_alert = { - name: raw_alert['Key'], - result: result_code.name, - } - - new_alert.merge!(get_region_info(region_refs)) if region_refs.present? - - if result_code != DocAuth::Acuant::ResultCodes::PASSED - processed_alerts[:failed].push(new_alert) - else - processed_alerts[:passed].push(new_alert) - end - end - - processed_alerts - end - end - end - end -end diff --git a/app/services/doc_auth/acuant/sensor_types.rb b/app/services/doc_auth/acuant/sensor_types.rb deleted file mode 100644 index 49bea04eca0..00000000000 --- a/app/services/doc_auth/acuant/sensor_types.rb +++ /dev/null @@ -1,17 +0,0 @@ -module DocAuth - module Acuant - module SensorTypes - UNKNOWN = '0'.freeze - CAMERA = '1'.freeze - SCANNER = '2'.freeze - MOBILE = '3'.freeze - - ALL = [ - UNKNOWN, - CAMERA, - SCANNER, - MOBILE, - ].freeze - end - end -end diff --git a/app/services/doc_auth/classification_concern.rb b/app/services/doc_auth/classification_concern.rb index bbfb2b12ff9..e8e8d724a6a 100644 --- a/app/services/doc_auth/classification_concern.rb +++ b/app/services/doc_auth/classification_concern.rb @@ -39,8 +39,8 @@ def doc_issuing_country_ok?(classification_info, doc_side) def doc_issuer_type_ok?(classification_info, doc_side) side_issuer_type = classification_info&.with_indifferent_access&.dig(doc_side, :IssuerType) - side_issuer_type == DocAuth::Acuant::IssuerTypes::STATE_OR_PROVINCE.name || - side_issuer_type == DocAuth::Acuant::IssuerTypes::UNKNOWN.name || + side_issuer_type == DocAuth::IssuerTypes::STATE_OR_PROVINCE.name || + side_issuer_type == DocAuth::IssuerTypes::UNKNOWN.name || !side_issuer_type.present? end diff --git a/app/services/doc_auth/error_generator.rb b/app/services/doc_auth/error_generator.rb index 33395c57c2a..dd84a810254 100644 --- a/app/services/doc_auth/error_generator.rb +++ b/app/services/doc_auth/error_generator.rb @@ -147,8 +147,8 @@ def get_id_type_errors(classification_info) side_class == 'Unknown' country_ok = !side_country.present? || supported_country_codes.include?(side_country) issuer_type_ok = !side_issuer_type.present? || - side_issuer_type == DocAuth::Acuant::IssuerTypes::STATE_OR_PROVINCE.name || - side_issuer_type == DocAuth::Acuant::IssuerTypes::UNKNOWN.name + side_issuer_type == DocAuth::IssuerTypes::STATE_OR_PROVINCE.name || + side_issuer_type == DocAuth::IssuerTypes::UNKNOWN.name both_side_ok &&= issuer_type_ok && side_ok && country_ok error_result.add_side(side.downcase.to_sym) unless side_ok && issuer_type_ok && country_ok end diff --git a/app/services/doc_auth/issuer_types.rb b/app/services/doc_auth/issuer_types.rb new file mode 100644 index 00000000000..bee0589b6dd --- /dev/null +++ b/app/services/doc_auth/issuer_types.rb @@ -0,0 +1,29 @@ +module DocAuth + module IssuerTypes + IssuerType = Struct.new(:code, :name) + + UNKNOWN = IssuerType.new(0, 'Unknown').freeze + COUNTRY = IssuerType.new(1, 'Country').freeze + STATE_OR_PROVINCE = IssuerType.new(2, 'StateProvince').freeze + TRIBAL = IssuerType.new(3, 'Tribal').freeze + MUNICIPALITY = IssuerType.new(4, 'Municipality').freeze + BUSINESS = IssuerType.new(5, 'Business').freeze + OTHER = IssuerType.new(6, 'Other').freeze + + ALL = [ + UNKNOWN, + COUNTRY, + STATE_OR_PROVINCE, + TRIBAL, + MUNICIPALITY, + BUSINESS, + OTHER, + ].freeze + + BY_CODE = ALL.index_by(&:code).freeze + + def self.from_int(code) + BY_CODE[code] + end + end +end diff --git a/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb b/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb index 8cc25fc34c7..d6f67e57893 100644 --- a/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb +++ b/app/services/doc_auth/lexis_nexis/lexis_nexis_client.rb @@ -8,10 +8,6 @@ def initialize(**config_keywords) @config.validate! end - def create_document - raise NotImplementedError - end - def post_images( front_image:, back_image:, diff --git a/app/services/doc_auth/mock/doc_auth_mock_client.rb b/app/services/doc_auth/mock/doc_auth_mock_client.rb index 739a6617fe0..c872788bfba 100644 --- a/app/services/doc_auth/mock/doc_auth_mock_client.rb +++ b/app/services/doc_auth/mock/doc_auth_mock_client.rb @@ -25,17 +25,6 @@ def self.reset! @last_uploaded_back_image = nil end - def create_document - return mocked_response_for_method(__method__) if method_mocked?(__method__) - - instance_id = SecureRandom.uuid - Responses::CreateDocumentResponse.new( - success: true, - errors: {}, - instance_id: instance_id, - ) - end - # rubocop:disable Lint/UnusedMethodArgument def post_front_image(image:, instance_id:) return mocked_response_for_method(__method__) if method_mocked?(__method__) @@ -64,11 +53,7 @@ def post_images( ) return mocked_response_for_method(__method__) if method_mocked?(__method__) - document_response = create_document - return document_response unless document_response.success? - - instance_id = document_response.instance_id - + instance_id = SecureRandom.uuid front_image_response = post_front_image(image: front_image, instance_id: instance_id) return front_image_response unless front_image_response.success? diff --git a/app/services/doc_auth/mock/responses/create_document_response.rb b/app/services/doc_auth/mock/responses/create_document_response.rb deleted file mode 100644 index ddff690c76a..00000000000 --- a/app/services/doc_auth/mock/responses/create_document_response.rb +++ /dev/null @@ -1,18 +0,0 @@ -module DocAuth - module Mock - module Responses - class CreateDocumentResponse < DocAuth::Response - attr_reader :instance_id - - def initialize(instance_id:, success: true, errors: [], exception: nil) - @instance_id = instance_id - super( - success: success, - errors: errors, - exception: exception, - ) - end - end - end - end -end diff --git a/app/services/doc_auth/mock/result_response.rb b/app/services/doc_auth/mock/result_response.rb index 4f1d388866a..3f46020a9c3 100644 --- a/app/services/doc_auth/mock/result_response.rb +++ b/app/services/doc_auth/mock/result_response.rb @@ -187,9 +187,9 @@ def classification_info def doc_auth_result_from_success if success? - DocAuth::Acuant::ResultCodes::PASSED.name + DocAuth::ResultCodes::PASSED.name else - DocAuth::Acuant::ResultCodes::CAUTION.name + DocAuth::ResultCodes::CAUTION.name end end diff --git a/app/services/doc_auth/acuant/result_codes.rb b/app/services/doc_auth/result_codes.rb similarity index 98% rename from app/services/doc_auth/acuant/result_codes.rb rename to app/services/doc_auth/result_codes.rb index 052bfe4c6ea..9582954e6e4 100644 --- a/app/services/doc_auth/acuant/result_codes.rb +++ b/app/services/doc_auth/result_codes.rb @@ -1,5 +1,4 @@ module DocAuth - module Acuant module ResultCodes ResultCode = Struct.new(:code, :name, :billed) do alias_method :billed?, :billed @@ -34,5 +33,4 @@ def self.from_int(code) BY_CODE[code] end end - end end diff --git a/app/services/doc_auth_router.rb b/app/services/doc_auth_router.rb index ef30257e501..f82d2ebeeb6 100644 --- a/app/services/doc_auth_router.rb +++ b/app/services/doc_auth_router.rb @@ -132,7 +132,6 @@ def translate_form_response!(response) def translate_doc_auth_errors!(response) error_keys = DocAuth::ErrorGenerator::ERROR_KEYS.dup - error_keys.delete(:selfie) if @client.is_a?(DocAuth::Acuant::AcuantClient) error_keys.each do |category| cat_errors = response.errors[category] @@ -161,21 +160,6 @@ def translate_generic_errors!(response) # @param [Proc,nil] warn_notifier proc takes a hash, and should log that hash to events.log def self.client(vendor_discriminator: nil, warn_notifier: nil, analytics: nil) case doc_auth_vendor(discriminator: vendor_discriminator, analytics: analytics) - when Idp::Constants::Vendors::ACUANT - DocAuthErrorTranslatorProxy.new( - DocAuth::Acuant::AcuantClient.new( - assure_id_password: IdentityConfig.store.acuant_assure_id_password, - assure_id_subscription_id: IdentityConfig.store.acuant_assure_id_subscription_id, - assure_id_url: IdentityConfig.store.acuant_assure_id_url, - assure_id_username: IdentityConfig.store.acuant_assure_id_username, - facial_match_url: IdentityConfig.store.acuant_facial_match_url, - passlive_url: IdentityConfig.store.acuant_passlive_url, - warn_notifier: warn_notifier, - dpi_threshold: IdentityConfig.store.doc_auth_error_dpi_threshold, - sharpness_threshold: IdentityConfig.store.doc_auth_error_sharpness_threshold, - glare_threshold: IdentityConfig.store.doc_auth_error_glare_threshold, - ), - ) when Idp::Constants::Vendors::LEXIS_NEXIS, 'lexisnexis' # Use constant once configured in prod DocAuthErrorTranslatorProxy.new( DocAuth::LexisNexis::LexisNexisClient.new( diff --git a/spec/features/idv/doc_auth/redo_document_capture_spec.rb b/spec/features/idv/doc_auth/redo_document_capture_spec.rb index 0916b126bbd..78d98d73b62 100644 --- a/spec/features/idv/doc_auth/redo_document_capture_spec.rb +++ b/spec/features/idv/doc_auth/redo_document_capture_spec.rb @@ -204,7 +204,7 @@ before do sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_error_unknown + mock_doc_auth_lexis_nexis_error_unknown attach_and_submit_images click_try_again end @@ -267,7 +267,7 @@ before do sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_error_unknown + mock_doc_auth_lexis_nexis_error_unknown attach_and_submit_images click_try_again end @@ -286,7 +286,7 @@ start_idv_from_sp sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_error_unknown + mock_doc_auth_lexis_nexis_error_unknown attach_images attach_selfie submit_images @@ -405,10 +405,12 @@ allow_any_instance_of(FederatedProtocols::Oidc). to receive(:biometric_comparison_required?).and_return(true) allow_any_instance_of(DocAuth::Response).to receive(:selfie_status).and_return(:fail) + allow(IdentityConfig.store).to receive(:doc_auth_check_failed_image_resubmission_enabled). + and_return(false) start_idv_from_sp sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_error_unknown + mock_doc_auth_lexis_nexis_error_unknown attach_images attach_selfie submit_images diff --git a/spec/fixtures/acuant_responses/create_document_response.json b/spec/fixtures/acuant_responses/create_document_response.json deleted file mode 100644 index 45a8c782dd0..00000000000 --- a/spec/fixtures/acuant_responses/create_document_response.json +++ /dev/null @@ -1 +0,0 @@ -"this-is-a-test-instance-id" diff --git a/spec/fixtures/acuant_responses/facial_match_response_failure.json b/spec/fixtures/acuant_responses/facial_match_response_failure.json deleted file mode 100644 index c9917b0f017..00000000000 --- a/spec/fixtures/acuant_responses/facial_match_response_failure.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Score": 68, - "IsMatch": false, - "TransactionId": "5f202f90-2ebf-460f-ac65-ee91024a4830" -} diff --git a/spec/fixtures/acuant_responses/facial_match_response_success.json b/spec/fixtures/acuant_responses/facial_match_response_success.json deleted file mode 100644 index 5fa9c5dec9c..00000000000 --- a/spec/fixtures/acuant_responses/facial_match_response_success.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "Score": 83, - "IsMatch": true, - "TransactionId": "4590434c-6169-4495-8441-f89857c2b661" -} diff --git a/spec/fixtures/acuant_responses/get_face_image_response.jpg b/spec/fixtures/acuant_responses/get_face_image_response.jpg deleted file mode 100644 index ca554d8d826dc3dc67b237e4f03de70d1a9a7422..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4690 zcmZXXc|26#|HtoG$2xR2Iv@?Te0jv4JyBF+21Det9Z=!SfGsMM+nD@)g8lNum#|Q z1EoMLGfWy_;)5~s!N4{E4b6xZ_PhKZ22F*D1;z@nvBNnyxu6cMNC3tR)iJZMv9PnT zz}X(am;h!z7JeyKbpdH4+bJ6jl;gca?4gozhJu;rHA`ij)P$Pv4;aO3J%$r(Ps%zA zA0;I`$g)0N7Dkr4aO`HHcgu~z@N5yUS$Sh^m-34~IZ3S%8$%|(A#}huWsL_Kwc3 z?w&7Shrf-Cejl5eCoU{5{aB{_+T7aSq3-TeLf-ug5<36p+=pOc{g09lU}AzenVFbb znOK=vSnx2&N6bimDHcifQv$4N(i%3XlWdxY91R8Uo!1JrmWj(WDivaPI%-QAkiF4- znsA>i{Mh-Jmz?p1c=@bB$ax~aIkX`V6H^G~;-!6VJP*8meD|3`!onl|;z~$N z`U@>P=Wn>O@`}ItT3Y`h9Qp@wcJ6P;jejY}0V9BegA>jP=i=hv;^gAu;ze?Ea`6ZV z3nEbnA%1>dA$|l3fk5%2Ls*gL%sHHhq zeZO}1yf4js>cGPkw|LDh#Me^80Wl4j%m;qYrESk8CpdG+;Ib?+2RO6!qiI+o3Y zn|G6qB)iQP?~Afq*-;I`hzhN_EQ2k`QjSLLuMbX$9Uc#~JI`p?P0mutl82Qqyme{O z-LzVR-5<$w6cqU-=2-uO$ZBe8b=d#KX28amJJroPXvNZZeywFD-d?{d^mUGS7za&@ zuiQzTv%5}7IVx@!<2#ja;Qjp@x0?9JvPrE{%5KyXY}{1)ij8;i>EzSB*dD`qE2~P? zOM>H`4|+d~)_iiTizHI=-hL{wE4@cy)TiatR`!k5Uh>IeQp=NkG_B-2PKXhF@$56p z-6~DIm3;fJ3&uK~1%GfF4;}StrmkptW^Bltg!f!G2E6U9M&I;G7;F>d=ASs9C3;ty z*}1NqS-k3cY%?ugvOI5+t~;k46Z?D~r~Zp)<&W@%Qi_YWlTq9^u4LoW3MUS~W!G!_ zS*knneMpI5P@V3guD>8BBQkzRPEOF($%;?yt^g;t$|g@{8v1^4C`w?gOm#K$rqUzQ zjp956F$cUtmv1GcIkXyw*74xSylK*9!kP8E;ecAsm`HFsVYYV>Gm zT*uNn@$ zW%AfO9(*jq>8;}FS&ykt+3wS6XFicVcdqWJ`Z~H=b-j-FtA}N*O#H?00H@=^y0o~! z`wUvetrC}9siB`%QkHsYSWIdW9>IOV<*G53t4)QVqqpn#S<>E zPrSaaIBXH~KT`0f{ZO`brbWR{tybjmg765jB;@jK!wbXwVPV_3O7E5Y-xMBIxS#8! z+X^!d*VEI)O3PoF@0ojMF7jqJKl(-N+dbpopAt&+7}(zP(<$Te>IUD<-Zynr^4hF? zcXyOY@!Pz0M4cg((E+bGg(Rw-VW006ejhS$(8(ZbD6w3N7k{eR$w!%ZtBO5bT*Heu z^M8uwA|YSgY$Myl+hX-jci@k7QqF#BtvMc6i+Obfzu^+|PL>?n%J4}T&s6SCKk5L9`z>h;CL@z}0J`6cp@YCzj5D_X=ko4#iH6G6M+WPo!xY*kEr0#+Lhw3z@gn6! z_lbJO;@dC2?RHntKDeII zX({zQXnGR_)Ed{&g!Qu%!Rx~Fo2rEEn~VVldhtHZU^RUV(@O71b-hY0eHjDEq9$^G*TJ-3AbA7;CN3BsAfAJq2#`qh;?>6G z6%c6QIzQ^nh|zR4hibj(#cP=K-ExcNF8h+ZKdV0KWCKAq*I_{|-9{`#Oa*aJ3^6Meu!RmBgBKAA0@2XhbkQV9fgs~pI+q{_yi&wV;OKlT3)=MR zbZUz`+W2M<@!&~XbmXe{KwQ5|yb5nI>u2evc$Gl$gHii4o1WDNf&L4VhdoehGx>1l zkbGgbgpgG$j&Z}AM047Sk@xIc0{1G)Nfc0?`A$|l$7sK#?02dJiZp1$`=AZI=1O5G z(m8`lm;3Py;M~)-P7r8q$2INKk6x)XCZ8=lYqd;{pbCRPdk+YNKu(>pzW@SJdCJEQ zyh#y<0%a%Spj0ozvY-ASz3{Vxv4_R$2qK!yg14mYLJTu|CLMVX9t~065&i4ky^bm0 z<*IG?g4n&WZo-=FSGETN(_cMJd#Od=E;g5mX*Wt zw56eEyCZrX^l0C76(K+OC2Bq_9Y#OJpu!T!{(!$~gO6N22(b5ud2SrDvNMY-R;Ilu?&wm z*QAzF+if=UXw#bmE>EnUQlLe(S-YLX^TS*!v1oJehhknX>e?7;KalwL_m#{5jENQ6 zOhf+x958@SN*xJBlH@&7Txe$LKr?~-{{m@0Gb0@|ryj{q1)V#)Ui?}nDYM`2c!Kg7 z(rWsP`)6iyCQe9G3)1g*hW?6rA03pzLGO*0iz;YLExF@?rm6Z7y^-A|M{ZlPE@z<(J z^BF|sDA~(-?5AFsP3sR&l_GrG8eZOux%4%?^)|Zt)1Hid3uU^)>Vw$b58XSxt5&rs z)*9FFTZ#8me+J?(23(6Ht#$wAI^-9pnb>8Fuh{jTQzLMFc0Ysq%lelU>^|6tT_!c6 z`Y{_EuaeoCyf1@5So^|A)pJ-B8493sSA6AJ&-Xcf3dL%HS^AOhptU#?3@L0%Hx`0Kf>G`2z1Wn=d~|+Q5$ewAdo&2 zWG5WD*SPVABNaDe6*2eT;*y$!mb)3DAe{{ORD|gGZu@THx_0s~y(4r+RiE6iE2Hf% zO_kYaw_5tD*!0Qg*}D&Zd3=EP=hC&*>5D$M_P+8-ICU@2&8BbD5l_QbFg^8CqN%7u zT0qO6G11TCV2at@2?31FiF1L!uxs)_Kx}XPi2-=?fPnYnjA!Ro!qK z+IjzWlwq;D)PFIy37Onw*yX&fB`lc+rJ#fE4pb3S`Q;D{pKWcV{b7=F*Y|od#r{u~ znbo+IfV@q-8(w6@PL>4oDoh2vN_wzL9ZGq(F6oZC97cMho}-kz{NOP z`|hAnKL}XrqYi83DjSsbU}j#Q(M{6u{Q?5D>~sXx5mG&2-DoF!7q&D7HqjpU4(?t7 zaeJMzZ)PU~5ojN$HO$8SPb{X-gE2oNTN`wS6|2s$vBo1!j#YCCxs64uy;#LBKUvN? z1G}1F+f2IReih4I!+jn1s;-mHoyA_{*0oy*KU&(tPT#gaSy#4kEq2IE!!aU3J}0+- z2a*b%ThHFo?LlBewP{esaOvTDMWdJ8hbkm4mAD*FB%z{e73LV_E?KDsH1>COAb|Fh z?s_tUFFxidk9yGfR4TnTTqm0JvBv`O2~ctrh?@-={6pWM;exJo9HeiIbM5H_jhaQr zE9{;^Cz*ouZ5-HNHUdf5&SXjPDD%KPh~83f*I$1yp(kCw(-(`eCTs@vb&t?;K|pvm zV)i!U5?i||{xGln#m}-tvNOu`+|#8y3Q1Y*ks0$G)XjSzz5JDJ)%S*Eu6t%TN+q9$ z1)Fx?RF*7XNX<~k_#CsFEoZSh7#$|z^u%rz(o{I5tAC;Ob`0^HQeiB&sLx~z$JVx) zbNVx7#Q;p_uqzRzs!`wiG62quke#77e)2CCF5WrZdKR42yu<0_XM&i|SQzyBYf C9Ja0i diff --git a/spec/fixtures/acuant_responses/get_results_response_expired.json b/spec/fixtures/acuant_responses/get_results_response_expired.json deleted file mode 100644 index a682e321831..00000000000 --- a/spec/fixtures/acuant_responses/get_results_response_expired.json +++ /dev/null @@ -1,1555 +0,0 @@ -{ - "Alerts": [ - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was not found", - "FieldReferences": [], - "Id": "a3aeea6d-eb09-489a-b703-7fe61547fa5b", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "9b2dda4c-7705-4db5-99a6-132b8c8b4a47" - ], - "Result": 1 - }, - { - "Actions": "Examine the data regions of the document for any visible indications that the data has been digitally manipulated. Request a new image, if possible, to repeat the test.", - "DataFieldReferences": [], - "Description": "Examines a document image for evidence of tampering or digital manipulation.", - "Disposition": "Evidence suggests the image has been tampered with or digitally manipulated.", - "FieldReferences": [], - "Id": "40ff3223-0082-408d-a54c-a0f4664952c8", - "ImageReferences": [], - "Information": "Tested the document image for evidence of tampering or digital manipulation.", - "Key": "Image Tampering Check", - "Name": "Image Tampering Check", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs on or after the current date. Also confirm that the current date and time of the host computer is correctly set.", - "DataFieldReferences": [], - "Description": "Checked if the document is expired.", - "Disposition": "The document has expired", - "FieldReferences": [ - "05943e81-16a5-419e-ad73-2d945fddf10a" - ], - "Id": "2f7651ac-34b2-49d6-970d-75a8ace09ae1", - "ImageReferences": [], - "Information": "Verified that the document expiration date does not occur before the current date.", - "Key": "Document Expired", - "Name": "Document Expired", - "RegionReferences": [], - "Result": 5 - }, - { - "Actions": "This test may fail if a document cannot be successfully classified as a supported document type. This may occur if the document is fraudulent as some fraudulent documents differ so much from authentic documents that they will not be recognized as that type of document. This may also occur if a valid document is significantly worn or damaged or if the document is of a new or different type that is not yet supported by the library. The document should be examined manually.", - "DataFieldReferences": [], - "Description": "Verified that the type of document is supported and is able to be fully authenticated.", - "Disposition": "The document type could not be determined", - "FieldReferences": [], - "Id": "018246a0-7bb9-42ed-b029-211d0c8ac97b", - "ImageReferences": [], - "Information": "Verified that the document is recognized as a supported document type and that the type of document can be fully authenticated.", - "Key": "Document Classification", - "Name": "Document Classification", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Verify that the data extracted from the 2D barcode appears to be correct and matches the data present on the front of the document.", - "DataFieldReferences": [], - "Description": "Checked the contents of the two-dimensional barcode on the document.", - "Disposition": "The 2D barcode is formatted correctly", - "FieldReferences": [], - "Id": "db4d88e1-15ed-4b0b-90a6-1164c6844ea3", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is read but cannot be correctly decoded. This failure could be caused by if the 2D barcode was incorrectly encoded, either inadvertently due to a manufacturing problem or intentionally.", - "Key": "2D Barcode Content", - "Name": "2D Barcode Content", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The 2D barcode on the could not be read or may be missing. Confirm that it is present, is not obstructed with any foreign material (e.g., dirt, labels, stickers), and is not excessively cracked or worn.", - "DataFieldReferences": [], - "Description": "Verified that the two-dimensional barcode on the document was read successfully.", - "Disposition": "The 2D barcode was read successfully", - "FieldReferences": [], - "Id": "9f831ef5-6361-4be0-9200-2e1eeb175e2b", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is expected but could not be read successfully. This could be caused by a 2D barcode that is dirty, in poor condition, or is covered by a foreign material such as a sticker. It is also possible that the 2D barcode could be invalid or a poor quality replication of an authentic barcode.", - "Key": "2D Barcode Read", - "Name": "2D Barcode Read", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "f0fff0f0-00ff-0fff-ff0f-0f0fff0f0f0f", - "a1a1aaaa-a111-11a1-1111-1a111a11111a" - ], - "Description": "Compare the machine-readable birth date field to the human-readable birth date field.", - "Disposition": "The birth dates match", - "FieldReferences": [], - "Id": "4f59ae27-4276-441a-89ad-96f3da0f4ece", - "ImageReferences": [], - "Information": "The birth date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Birth Date Crosscheck", - "Name": "Birth Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date on the document may have been misread. Confirm that it is legible.", - "DataFieldReferences": [], - "Description": "Verified that the birth date is valid.", - "Disposition": "The birth date is valid", - "FieldReferences": [ - "bb1111b1-111b-1b11-111b-11bb111bb1b1" - ], - "Id": "f403b529-faa9-4158-aedd-198a072e6e7d", - "ImageReferences": [], - "Information": "Verified that the birth date is valid, in the expected format, and occurs on or before the current date and not outside a reasonable range.", - "Key": "Birth Date Valid", - "Name": "Birth Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The document number field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "cc1c1111-cc11-11cc-cc11-1c1c1111c111", - "1111dd1d-1d11-1111-dd11-dd11111111dd" - ], - "Description": "Compare the machine-readable document number field to the human-readable document number field.", - "Disposition": "The document numbers match", - "FieldReferences": [], - "Id": "afb8411b-05dc-4e2a-8faa-221cdb64cfc6", - "ImageReferences": [], - "Information": "The document number is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Document Number Crosscheck", - "Name": "Document Number Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs after the issue and birth dates.", - "DataFieldReferences": [], - "Description": "Verified that the expiration date is valid.", - "Disposition": "The expiration date is valid", - "FieldReferences": [ - "05943e81-16a5-419e-ad73-2d945fddf10a" - ], - "Id": "ef0444c5-792e-4b90-a144-ffdd8e0aead9", - "ImageReferences": [], - "Information": "Verified that the document expiration date is valid, in the expected format, and occurs after the issue and birth dates.", - "Key": "Expiration Date Valid", - "Name": "Expiration Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The given name and/or surname fields on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "cdc4152d-8280-4049-b176-9abef1b9e196", - "1d894099-73a0-4274-88e1-7bb72f06d971" - ], - "Description": "Compare the machine-readable full name field to the human-readable full name field.", - "Disposition": "The full names match", - "FieldReferences": [], - "Id": "c4b349c3-396c-4fe1-8d04-60f8341571b3", - "ImageReferences": [], - "Information": "The full name is composed of the given name and the surname. These items are present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Full Name Crosscheck", - "Name": "Full Name Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The issue date on the document may have been misread. Confirm that all of the dates are legible, the issue date occurs on or before the current date, and is before the expiration date.", - "DataFieldReferences": [], - "Description": "Verified that the issue date is valid.", - "Disposition": "The issue date is valid", - "FieldReferences": [ - "49b38720-3c45-4624-802b-5dee0ba66310" - ], - "Id": "8cfb7eff-c602-4217-980d-702f3bc88d3a", - "ImageReferences": [], - "Information": "Verified that the document issue date is valid, in the expected format, does not occur in the future, does not occur before the date of birth, and does not occur after the expiration date.", - "Key": "Issue Date Valid", - "Name": "Issue Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Examine the image for indications that the document was not producted from an original document, on the uncropped image (if available), especially at the edges.", - "DataFieldReferences": [], - "Description": "Examines a document image for evidence that it could be a picture of a something other than an original document, such as a computer screen.", - "Disposition": "No evidence of a non-original document was detected.", - "FieldReferences": [], - "Id": "0a4dcd5e-b46c-42c9-9542-01a4ea90202d", - "ImageReferences": [], - "Information": "Tested the document image for evidence that the image was not produced from an original document.", - "Key": "Physical Document Presence", - "Name": "Physical Document Presence", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "a475810f-828d-40c4-8545-4f60cf833451", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "9285116d-a348-4932-bdad-8b7cf8a27308" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "0ecfa50a-0b47-483a-9fdd-7aa84ffe3fd6", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "f14a2fde-51a0-4009-a159-56bb32fe7c3f" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "d6ef7f41-e538-418e-8796-2ccbc8d43da7", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "2c42cacb-f019-452c-bd46-b70d6518d9d3" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "1ffdf4c6-369e-49e2-b270-c050c9563856", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "e8c6f2c3-d33e-4927-b8cb-48ab4307bcd2" - ], - "Result": 1 - }, - { - "Actions": "If the test fails, check to make sure that the photo area is not obscured and that the photo has not been altered or replaced.", - "DataFieldReferences": [], - "Description": "Verifies the visible characteristics of the Photo", - "Disposition": "The photo has the expected appearance", - "FieldReferences": [], - "Id": "63c1f62c-1e26-4f9c-8f48-31a46ebbfd38", - "ImageReferences": [], - "Information": "Verifies that the general appearance of photo on the document is as expected. This test may be used to verify that the photo has not been obscured or replaced in any way. ", - "Key": "Visible Photo Characteristics", - "Name": "Visible Photo Characteristics", - "RegionReferences": [ - "7dba5bbf-1a5f-41bf-9b1c-b1b7b98e0d97" - ], - "Result": 1 - } - ], - "AuthenticationSensitivity": 0, - "Biographic": { - "Age": 71, - "BirthDate": "/Date(-631123200000)/", - "ExpirationDate": "/Date(1610582400000)/", - "FullName": "FAKEY MIDDLE MCFAKERSON", - "Gender": 1, - "Photo": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Field/Image?key=Photo" - }, - "Classification": { - "ClassificationDetails": { - "Back": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "DocumentDataTypes": [ - 0 - ], - "GeographicRegions": null, - "Id": "168a1e06-a354-42c0-89e5-2574747c251b", - "IsGeneric": true, - "Issue": null, - "IssueType": "ID1 Barcode Back", - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "ID1 Barcode Back", - "ReferenceDocumentDataTypes": [], - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - }, - "Front": { - "Class": 3, - "ClassCode": null, - "ClassName": "Drivers License", - "CountryCode": "USA", - "DocumentDataTypes": [ - 2 - ], - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "b1d95908-e170-448d-8988-1336ba9e4206", - "IsGeneric": false, - "Issue": "2004", - "IssueType": "Driver's License", - "IssuerCode": "MN", - "IssuerName": "Minnesota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "Minnesota (MN) Driver's License", - "ReferenceDocumentDataTypes": [ - 0 - ], - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 4, - "Side": 0 - }, - { - "Light": 3, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "Mode": 0, - "OrientationChanged": false, - "PresentationChanged": false, - "Type": { - "Class": 3, - "ClassCode": null, - "ClassName": "Drivers License", - "CountryCode": "USA", - "DocumentDataTypes": [ - 2 - ], - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "b1d95908-e170-448d-8988-1336ba9e4206", - "IsGeneric": false, - "Issue": "2004", - "IssueType": "Driver's License", - "IssuerCode": "MN", - "IssuerName": "Minnesota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "Minnesota (MN) Driver's License", - "ReferenceDocumentDataTypes": [ - 0 - ], - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 4, - "Side": 0 - }, - { - "Light": 3, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "DataFields": [ - { - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "f0fff0f0-00ff-0fff-ff0f-0f0fff0f0f0f", - "IsImage": false, - "Key": "2D Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(-631123200000)/" - }, - { - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "cc1c1111-cc11-11cc-cc11-1c1c1111c111", - "IsImage": false, - "Key": "2D Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "G111111111111" - }, - { - "DataSource": 2, - "Description": "The person's first name", - "Id": "3ba44f92-6675-40f5-b759-fa77e4d999af", - "IsImage": false, - "Key": "2D First Name", - "Name": "First Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "FAKEY" - }, - { - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "cdc4152d-8280-4049-b176-9abef1b9e196", - "IsImage": false, - "Key": "2D Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "FAKEY MIDDLE MCFAKERSON" - }, - { - "DataSource": 2, - "Description": "The person's given name", - "Id": "f9dc6a2c-30f1-42ca-a6c4-b9ede02ab4b3", - "IsImage": false, - "Key": "2D Given Name", - "Name": "Given Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "FAKEY MIDDLE" - }, - { - "DataSource": 2, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "98ea7c51-2dff-46d7-bba6-3af4be0957c3", - "IsImage": false, - "Key": "2D Issuing State Code", - "Name": "Issuing State Code", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "MN" - }, - { - "DataSource": 2, - "Description": "Full name of the state or country that issued the document", - "Id": "413e45bd-3706-4688-a49c-b97284aba2b1", - "IsImage": false, - "Key": "2D Issuing State Name", - "Name": "Issuing State Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "MINNESOTA" - }, - { - "DataSource": 2, - "Description": "The person's middle name", - "Id": "0aa7d4bb-0588-4f72-bd42-52b728f1bfca", - "IsImage": false, - "Key": "2D Middle Name", - "Name": "Middle Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "MIDDLE" - }, - { - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "eee00000-eee0-0e00-e0ee-000e0e000000", - "IsImage": false, - "Key": "2D Surname", - "Name": "Surname", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "MCFAKERSON" - }, - { - "DataSource": 2, - "Description": "Raw data extracted from the 2D barcode of the document", - "Id": "5a8b2898-d506-4ea0-8e0a-311641eea67d", - "IsImage": false, - "Key": "Data_2DBarcode", - "Name": "2D Barcode Data", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "314debf9-dd14-4f2e-a414-2700ca7092c1", - "Reliability": 0.99, - "Type": "uri", - "Value": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Data?type=Barcode2D" - }, - { - "DataSource": 6, - "Description": "The person's legal, residence, or mailing address", - "Id": "d149be26-a694-4534-aa92-51c32cf56e59", - "IsImage": false, - "Key": "VIZ Address", - "Name": "Address", - "RegionOfInterest": { - "height": 113, - "width": 733, - "x": 15, - "y": 22 - }, - "RegionReference": "489401e8-23a7-44c2-b6a2-ea087f179e03", - "Reliability": 0.7972221970558167, - "Type": "string", - "Value": "123 MAIN ST
ST PAUL. MN 55555" - }, - { - "DataSource": 6, - "Description": "The person's date of birth", - "Id": "a1a1aaaa-a111-11a1-1111-1a111a11111a", - "IsImage": false, - "Key": "VIZ Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 17, - "width": 109, - "x": 5, - "y": 6 - }, - "RegionReference": "8e8c2a11-07d5-4217-ab2b-254514f0a641", - "Reliability": 0.7018181681632996, - "Type": "datetime", - "Value": "/Date(-631123200000)/" - }, - { - "DataSource": 6, - "Description": "A number that identifies a document", - "Id": "1111dd1d-1d11-1111-dd11-dd11111111dd", - "IsImage": false, - "Key": "VIZ Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 21, - "width": 179, - "x": 16, - "y": 5 - }, - "RegionReference": "7e7f01ee-e55c-4a5e-8ed5-b42766a65ec1", - "Reliability": 0.9957143068313599, - "Type": "string", - "Value": "G111111111111" - }, - { - "DataSource": 6, - "Description": "Date that the document will expire", - "Id": "1ee1111e-ee1e-1e11-e11e-e1e1e1eee111", - "IsImage": false, - "Key": "VIZ Expiration Date", - "Name": "Expiration Date", - "RegionOfInterest": { - "height": 52, - "width": 324, - "x": 14, - "y": 22 - }, - "RegionReference": "07ecef9b-0a9f-412b-b88b-8ec3f5173bac", - "Reliability": 0.6236363649368286, - "Type": "datetime", - "Value": "/Date(1610582400000)/" - }, - { - "DataSource": 6, - "Description": "The person's eye color", - "Id": "f11f1ff1-11f1-1111-ff11-11f11f111fff", - "IsImage": false, - "Key": "VIZ Eye Color", - "Name": "Eye Color", - "RegionOfInterest": { - "height": 14, - "width": 39, - "x": 10, - "y": 2 - }, - "RegionReference": "b05be09a-c4ca-4d7d-91f4-e12db89604c7", - "Reliability": 1, - "Type": "string", - "Value": "BRN" - }, - { - "DataSource": 6, - "Description": "The person's full name (given name plus surname)", - "Id": "1d894099-73a0-4274-88e1-7bb72f06d971", - "IsImage": false, - "Key": "VIZ Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 52, - "width": 707, - "x": 18, - "y": 30 - }, - "RegionReference": "4398c09f-e740-4667-ae12-7464a6c3c068", - "Reliability": 0.5370000004768372, - "Type": "string", - "Value": "FAKEY MIDDLE MCFAKERSON" - }, - { - "DataSource": 6, - "Description": "The person's height ", - "Id": "8e258aac-f426-4b84-8eef-18d0b80daf88", - "IsImage": false, - "Key": "VIZ Height", - "Name": "Height", - "RegionOfInterest": { - "height": 16, - "width": 34, - "x": 6, - "y": 1 - }, - "RegionReference": "cd512b52-9209-4b5c-bfe3-4c036a1d1267", - "Reliability": 0.7599999904632568, - "Type": "string", - "Value": "6-0" - }, - { - "DataSource": 7, - "Description": "Date that the document was issued", - "Id": "db739487-d02a-4ac1-9761-98559ed4cd01", - "IsImage": false, - "Key": "VIZ Issue Date", - "Name": "Issue Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.4399999976158142, - "Type": "datetime", - "Value": "/Date(1496275200000)/" - }, - { - "DataSource": 6, - "Description": "A person's image", - "Id": "c105294c-bf92-47f8-ab06-d9c566653257", - "IsImage": true, - "Key": "VIZ Photo", - "Name": "Photo", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "7dba5bbf-1a5f-41bf-9b1c-b1b7b98e0d97", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Field/Image?key=VIZ%20Photo" - }, - { - "DataSource": 6, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "f40dbbe4-4a96-451e-acb2-beb512d76fb2", - "IsImage": false, - "Key": "VIZ Sex", - "Name": "Sex", - "RegionOfInterest": { - "height": 15, - "width": 15, - "x": 10, - "y": 7 - }, - "RegionReference": "8c38666e-6f87-4201-a2bf-9e4a2eb08962", - "Reliability": 0.7200000286102295, - "Type": "string", - "Value": "M" - }, - { - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "696e6b5a-13fa-49ef-96d5-db7e289d5c83", - "IsImage": true, - "Key": "VIZ Signature", - "Name": "Signature", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "f3c3c14a-ce07-45d9-8cba-95ff3c0f17f6", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Field/Image?key=VIZ%20Signature" - }, - { - "DataSource": 6, - "Description": "The person's weight or weight class", - "Id": "0c0ccc0c-00c0-00cc-0ccc-ccc00c0c0cc0", - "IsImage": false, - "Key": "VIZ Weight", - "Name": "Weight", - "RegionOfInterest": { - "height": 15, - "width": 30, - "x": 13, - "y": 4 - }, - "RegionReference": "5669183b-926b-4dc0-b12a-5fd3968e9dd6", - "Reliability": 0.8974999785423279, - "Type": "string", - "Value": "99" - } - ], - "Device": { - "HasContactlessChipReader": false, - "HasMagneticStripeReader": false, - "SerialNumber": "xxxxx", - "Type": { - "Manufacturer": "Login.gov", - "Model": "Doc Auth 1.0", - "SensorType": 3 - } - }, - "EngineVersion": "2.17.2.291", - "Fields": [ - { - "DataFieldReferences": [ - "d149be26-a694-4534-aa92-51c32cf56e59" - ], - "DataSource": 6, - "Description": "The person's legal, residence, or mailing address", - "Id": "1a8af821-1ba3-4e2c-9983-d236e3d8fa2c", - "IsImage": false, - "Key": "Address", - "Name": "Address", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "123 MAIN ST
ST PAUL. MN 55555" - }, - { - "DataFieldReferences": [ - "d149be26-a694-4534-aa92-51c32cf56e59" - ], - "DataSource": 6, - "Description": "City of the person's legal, residence, or mailing address", - "Id": "42739c82-aa0e-45fd-a802-2243dc1d8852", - "IsImage": false, - "Key": "Address City", - "Name": "Address City", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "ST PAUL" - }, - { - "DataFieldReferences": [ - "d149be26-a694-4534-aa92-51c32cf56e59" - ], - "DataSource": 6, - "Description": "First address line of the person's legal, residence, or mailing address", - "Id": "9ed5e9c6-7199-482d-ad22-9ffaed6e4d3c", - "IsImage": false, - "Key": "Address Line 1", - "Name": "Address Line 1", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "123 MAIN ST" - }, - { - "DataFieldReferences": [ - "d149be26-a694-4534-aa92-51c32cf56e59" - ], - "DataSource": 6, - "Description": "Postal code of the person's address", - "Id": "cfc75541-9353-4354-a37c-5c7ccdb0602b", - "IsImage": false, - "Key": "Address Postal Code", - "Name": "Address Postal Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "55555" - }, - { - "DataFieldReferences": [ - "d149be26-a694-4534-aa92-51c32cf56e59" - ], - "DataSource": 6, - "Description": "State of the person's legal, residence, or mailing address", - "Id": "86d14e43-a410-40f0-976c-819c4cb3683d", - "IsImage": false, - "Key": "Address State", - "Name": "Address State", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "MN" - }, - { - "DataFieldReferences": [ - "f0fff0f0-00ff-0fff-ff0f-0f0fff0f0f0f", - "a1a1aaaa-a111-11a1-1111-1a111a11111a" - ], - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "bb1111b1-111b-1b11-111b-11bb111bb1b1", - "IsImage": false, - "Key": "Birth Date", - "Name": "Birth Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(-631123200000)/" - }, - { - "DataFieldReferences": [], - "DataSource": 7, - "Description": "The localized version of the document class of the document type", - "Id": "ca74c286-8367-4201-bab6-c16b60bb36bc", - "IsImage": false, - "Key": "Document Class Name", - "Name": "Document Class Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "Drivers License" - }, - { - "DataFieldReferences": [ - "cc1c1111-cc11-11cc-cc11-1c1c1111c111", - "1111dd1d-1d11-1111-dd11-dd11111111dd" - ], - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "d0dbee96-a395-4e98-9e8a-b6b0b3cde3ec", - "IsImage": false, - "Key": "Document Number", - "Name": "Document Number", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "G111111111111" - }, - { - "DataFieldReferences": [ - "1ee1111e-ee1e-1e11-e11e-e1e1e1eee111" - ], - "DataSource": 6, - "Description": "Date that the document will expire", - "Id": "05943e81-16a5-419e-ad73-2d945fddf10a", - "IsImage": false, - "Key": "Expiration Date", - "Name": "Expiration Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1610582400000)/" - }, - { - "DataFieldReferences": [ - "f11f1ff1-11f1-1111-ff11-11f11f111fff" - ], - "DataSource": 6, - "Description": "The person's eye color", - "Id": "26c5efe9-a5ee-4fa5-841b-f314713cc8cd", - "IsImage": false, - "Key": "Eye Color", - "Name": "Eye Color", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "BRN" - }, - { - "DataFieldReferences": [ - "3ba44f92-6675-40f5-b759-fa77e4d999af" - ], - "DataSource": 2, - "Description": "The person's first name", - "Id": "b79b0263-b22b-4b13-bf34-3dd0ba264574", - "IsImage": false, - "Key": "First Name", - "Name": "First Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "FAKEY" - }, - { - "DataFieldReferences": [ - "cdc4152d-8280-4049-b176-9abef1b9e196", - "1d894099-73a0-4274-88e1-7bb72f06d971" - ], - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "062598c5-2716-4237-89be-5a9821fe5e7b", - "IsImage": false, - "Key": "Full Name", - "Name": "Full Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "FAKEY MIDDLE MCFAKERSON" - }, - { - "DataFieldReferences": [ - "f9dc6a2c-30f1-42ca-a6c4-b9ede02ab4b3" - ], - "DataSource": 2, - "Description": "The person's given name", - "Id": "178bd90c-9f14-4ae5-b4ec-39adf720d41f", - "IsImage": false, - "Key": "Given Name", - "Name": "Given Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "FAKEY MIDDLE" - }, - { - "DataFieldReferences": [ - "8e258aac-f426-4b84-8eef-18d0b80daf88" - ], - "DataSource": 6, - "Description": "The person's height ", - "Id": "99ebebb2-afab-47b8-bb2a-c017fbbc79ec", - "IsImage": false, - "Key": "Height", - "Name": "Height", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "6-0" - }, - { - "DataFieldReferences": [ - "db739487-d02a-4ac1-9761-98559ed4cd01" - ], - "DataSource": 7, - "Description": "Date that the document was issued", - "Id": "49b38720-3c45-4624-802b-5dee0ba66310", - "IsImage": false, - "Key": "Issue Date", - "Name": "Issue Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1496275200000)/" - }, - { - "DataFieldReferences": [ - "98ea7c51-2dff-46d7-bba6-3af4be0957c3" - ], - "DataSource": 7, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "75867e49-9e33-41c0-be16-d09558499ef2", - "IsImage": false, - "Key": "Issuing State Code", - "Name": "Issuing State Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "MN" - }, - { - "DataFieldReferences": [ - "413e45bd-3706-4688-a49c-b97284aba2b1" - ], - "DataSource": 7, - "Description": "Full name of the state or country that issued the document", - "Id": "eab59db4-cbca-4739-a1be-c84e3b8bef57", - "IsImage": false, - "Key": "Issuing State Name", - "Name": "Issuing State Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "Minnesota" - }, - { - "DataFieldReferences": [ - "0aa7d4bb-0588-4f72-bd42-52b728f1bfca" - ], - "DataSource": 2, - "Description": "The person's middle name", - "Id": "9f013529-fc28-4836-947b-b6af9fd2038f", - "IsImage": false, - "Key": "Middle Name", - "Name": "Middle Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "MIDDLE" - }, - { - "DataFieldReferences": [ - "c105294c-bf92-47f8-ab06-d9c566653257" - ], - "DataSource": 6, - "Description": "A person's image", - "Id": "20ce245c-8c90-4beb-ab0d-17b455a8fbb3", - "IsImage": true, - "Key": "Photo", - "Name": "Photo", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Field/Image?key=Photo" - }, - { - "DataFieldReferences": [], - "DataSource": 7, - "Description": "Indicates whether the document is a form of identification that meets the increased security standards for US state-issued driver's licenses and identification cards under the REAL ID Act", - "Id": "a563beaf-6f81-402f-a35f-1817343415e2", - "IsImage": false, - "Key": "REAL ID Compliant", - "Name": "REAL ID Compliant", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "False" - }, - { - "DataFieldReferences": [ - "f40dbbe4-4a96-451e-acb2-beb512d76fb2" - ], - "DataSource": 6, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "6d43b46d-6740-41f6-9bea-a4143abf92ab", - "IsImage": false, - "Key": "Sex", - "Name": "Sex", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "M" - }, - { - "DataFieldReferences": [ - "696e6b5a-13fa-49ef-96d5-db7e289d5c83" - ], - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "339aded1-4923-4b5e-b708-cc82c4ee65dd", - "IsImage": true, - "Key": "Signature", - "Name": "Signature", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://us.assureid.acuant.net/AssureIDService/Document/00000000-0a00-00aa-0000-00a0a00a00aa/Field/Image?key=Signature" - }, - { - "DataFieldReferences": [ - "eee00000-eee0-0e00-e0ee-000e0e000000" - ], - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "172e8675-756c-405d-9395-ed0671d3c18d", - "IsImage": false, - "Key": "Surname", - "Name": "Surname", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "MCFAKERSON" - }, - { - "DataFieldReferences": [ - "0c0ccc0c-00c0-00cc-0ccc-ccc00c0c0cc0" - ], - "DataSource": 6, - "Description": "The person's weight or weight class", - "Id": "9154b9d4-3707-405f-b933-3ff3959ce363", - "IsImage": false, - "Key": "Weight", - "Name": "Weight", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "99" - } - ], - "Images": [ - { - "GlareMetric": 99, - "HorizontalResolution": 600, - "Id": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": 65, - "Side": 0, - "VerticalResolution": 600 - }, - { - "GlareMetric": 99, - "HorizontalResolution": 600, - "Id": "2512b2b7-0659-4015-a892-2d3094e95821", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": 59, - "Side": 1, - "VerticalResolution": 600 - } - ], - "InstanceId": "00000000-0a00-00aa-0000-00a0a00a00aa", - "LibraryVersion": "21.05.18.315", - "ProcessMode": 2, - "Regions": [ - { - "DocumentElement": 4, - "Id": "b4fd0de5-da0a-4534-ad1c-312bb6eb7995", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "2004 Series Validator", - "Rectangle": { - "height": 274, - "width": 304, - "x": 1509, - "y": 646 - } - }, - { - "DocumentElement": 3, - "Id": "314debf9-dd14-4f2e-a414-2700ca7092c1", - "ImageReference": "2512b2b7-0659-4015-a892-2d3094e95821", - "Key": "2D Barcode", - "Rectangle": { - "height": 1280, - "width": 2029, - "x": 0, - "y": 0 - } - }, - { - "DocumentElement": 3, - "Id": "489401e8-23a7-44c2-b6a2-ea087f179e03", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Address", - "Rectangle": { - "height": 166, - "width": 1289, - "x": 648, - "y": 481 - } - }, - { - "DocumentElement": 4, - "Id": "f14a2fde-51a0-4009-a159-56bb32fe7c3f", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Address Font", - "Rectangle": { - "height": 187, - "width": 1313, - "x": 623, - "y": 494 - } - }, - { - "DocumentElement": 4, - "Id": "39943348-cfda-4231-a466-0819e24b6e84", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Background", - "Rectangle": { - "height": 252, - "width": 790, - "x": 1133, - "y": 593 - } - }, - { - "DocumentElement": 4, - "Id": "9285116d-a348-4932-bdad-8b7cf8a27308", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Background Seal", - "Rectangle": { - "height": 330, - "width": 387, - "x": 1454, - "y": 638 - } - }, - { - "DocumentElement": 3, - "Id": "8e8c2a11-07d5-4217-ab2b-254514f0a641", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Birth Date", - "Rectangle": { - "height": 82, - "width": 389, - "x": 958, - "y": 632 - } - }, - { - "DocumentElement": 3, - "Id": "5c284fd5-f050-4983-9b75-715271fc42ae", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Block Locate viz", - "Rectangle": { - "height": 293, - "width": 120, - "x": 632, - "y": 386 - } - }, - { - "DocumentElement": 4, - "Id": "e8c6f2c3-d33e-4927-b8cb-48ab4307bcd2", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Data Font", - "Rectangle": { - "height": 134, - "width": 505, - "x": 622, - "y": 803 - } - }, - { - "DocumentElement": 4, - "Id": "2c42cacb-f019-452c-bd46-b70d6518d9d3", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Date Font", - "Rectangle": { - "height": 134, - "width": 1056, - "x": 819, - "y": 940 - } - }, - { - "DocumentElement": 3, - "Id": "7e7f01ee-e55c-4a5e-8ed5-b42766a65ec1", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Document Number", - "Rectangle": { - "height": 101, - "width": 626, - "x": 25, - "y": 1153 - } - }, - { - "DocumentElement": 3, - "Id": "d5eb65f1-7bcb-4b30-b3d7-569a691904f7", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Document Type", - "Rectangle": { - "height": 281, - "width": 1150, - "x": 725, - "y": 221 - } - }, - { - "DocumentElement": 3, - "Id": "07ecef9b-0a9f-412b-b88b-8ec3f5173bac", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Expiration Date", - "Rectangle": { - "height": 101, - "width": 377, - "x": 1494, - "y": 951 - } - }, - { - "DocumentElement": 3, - "Id": "b05be09a-c4ca-4d7d-91f4-e12db89604c7", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Eye Color", - "Rectangle": { - "height": 65, - "width": 173, - "x": 865, - "y": 776 - } - }, - { - "DocumentElement": 3, - "Id": "4398c09f-e740-4667-ae12-7464a6c3c068", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Full Name", - "Rectangle": { - "height": 89, - "width": 1282, - "x": 646, - "y": 404 - } - }, - { - "DocumentElement": 3, - "Id": "cd512b52-9209-4b5c-bfe3-4c036a1d1267", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Height", - "Rectangle": { - "height": 77, - "width": 137, - "x": 663, - "y": 903 - } - }, - { - "DocumentElement": 3, - "Id": "6641456e-4ea4-45cf-8234-7ec0b1bb3ec2", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Issue MM-YYYY", - "Rectangle": { - "height": 94, - "width": 283, - "x": 838, - "y": 956 - } - }, - { - "DocumentElement": 4, - "Id": "2a961047-954f-47ac-a29b-d294e2f39af7", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Minnesota Header", - "Rectangle": { - "height": 284, - "width": 1654, - "x": 236, - "y": 34 - } - }, - { - "DocumentElement": 2, - "Id": "7dba5bbf-1a5f-41bf-9b1c-b1b7b98e0d97", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Photo", - "Rectangle": { - "height": 768, - "width": 538, - "x": 63, - "y": 358 - } - }, - { - "DocumentElement": 3, - "Id": "8c38666e-6f87-4201-a2bf-9e4a2eb08962", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Sex", - "Rectangle": { - "height": 84, - "width": 98, - "x": 646, - "y": 761 - } - }, - { - "DocumentElement": 3, - "Id": "f3c3c14a-ce07-45d9-8cba-95ff3c0f17f6", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Signature", - "Rectangle": { - "height": 228, - "width": 1193, - "x": 682, - "y": 1042 - } - }, - { - "DocumentElement": 4, - "Id": "9b2dda4c-7705-4db5-99a6-132b8c8b4a47", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Top Background", - "Rectangle": { - "height": 295, - "width": 427, - "x": 34, - "y": 44 - } - }, - { - "DocumentElement": 4, - "Id": "ef3f45f4-638c-4545-85d9-2a8f879bdae0", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Validator", - "Rectangle": { - "height": 283, - "width": 1654, - "x": 236, - "y": 34 - } - }, - { - "DocumentElement": 1, - "Id": "a193157f-2cf5-47c9-bb0c-48723ce3d4bb", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Variable Reg", - "Rectangle": { - "height": 122, - "width": 267, - "x": 644, - "y": 950 - } - }, - { - "DocumentElement": 3, - "Id": "5669183b-926b-4dc0-b12a-5fd3968e9dd6", - "ImageReference": "68fabc65-3ddf-4ef0-93f5-4b960b69c545", - "Key": "Weight", - "Rectangle": { - "height": 72, - "width": 163, - "x": 889, - "y": 893 - } - } - ], - "Result": 2, - "Subscription": { - "DocumentProcessMode": 2, - "Id": "8e6ddf74-a410-4ae8-bfe1-51ed9f58699c", - "IsActive": true, - "IsDevelopment": true, - "IsTrial": false, - "Name": "IRS Proof-of-Concept", - "StorePII": false - }, - "TamperResult": 2, - "TamperSensitivity": 0 -} diff --git a/spec/fixtures/acuant_responses/get_results_response_failure.json b/spec/fixtures/acuant_responses/get_results_response_failure.json deleted file mode 100644 index 8d8a68075c0..00000000000 --- a/spec/fixtures/acuant_responses/get_results_response_failure.json +++ /dev/null @@ -1,220 +0,0 @@ -{ - "Alerts": [ - { - "Actions": "This test may fail if a document cannot be successfully classified as a supported document type. This may occur if the document is fraudulent as some fraudulent documents differ so much from authentic documents that they will not be recognized as that type of document. This may also occur if a valid document is significantly worn or damaged or if the document is of a new or different type that is not yet supported by the library. The document should be examined manually.", - "DataFieldReferences": [], - "Description": "Verified that the type of document is supported and is able to be fully authenticated.", - "Disposition": "The document type could not be determined", - "FieldReferences": [], - "Id": "555ce005-8bc5-46fa-9a9e-6576a71f484c", - "ImageReferences": [], - "Information": "Verified that the document is recognized as a supported document type and that the type of document can be fully authenticated.", - "Key": "Document Classification", - "Name": "Document Classification", - "RegionReferences": [], - "Result": 2 - } - ], - "AuthenticationSensitivity": 0, - "Biographic": { - "Age": 0, - "BirthDate": null, - "ExpirationDate": null, - "FullName": null, - "Gender": 0, - "Photo": null - }, - "Classification": { - "ClassificationDetails": { - "Back": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - }, - "Front": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "Mode": 0, - "OrientationChanged": false, - "PresentationChanged": false, - "Type": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "DataFields": [], - "Device": { - "HasContactlessChipReader": false, - "HasMagneticStripeReader": false, - "SerialNumber": "xxxxx", - "Type": { - "Manufacturer": "Login.gov", - "Model": "Doc Auth 1.0", - "SensorType": 3 - } - }, - "EngineVersion": "2.15.1.171", - "Fields": [], - "Images": [ - { - "GlareMetric": 50, - "HorizontalResolution": 300, - "Id": "fe7c612a-66bb-46ab-8b06-b28f657b6482", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": 50, - "Side": 0, - "Uri": "https://services.assureid.net/AssureIDService/Document/97b0215a-7858-4104-b1f3-17dbaf609140/Image?side=Front&light=White", - "VerticalResolution": 300 - }, - { - "GlareMetric": 50, - "HorizontalResolution": 300, - "Id": "60359af3-d87e-46da-ab5b-883ebfec923f", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": 50, - "Side": 1, - "Uri": "https://services.assureid.net/AssureIDService/Document/97b0215a-7858-4104-b1f3-17dbaf609140/Image?side=Back&light=White", - "VerticalResolution": 300 - } - ], - "InstanceId": "97b0215a-7858-4104-b1f3-17dbaf609140", - "LibraryVersion": "20.05.07.182", - "ProcessMode": 2, - "Regions": [], - "Result": 0, - "Subscription": { - "DocumentProcessMode": 2, - "Id": "fake-subscription-id", - "IsActive": true, - "IsDevelopment": true, - "IsTrial": false, - "Name": "Dev Test iProov", - "StorePII": false - }, - "TamperResult": 1, - "TamperSensitivity": 0 -} diff --git a/spec/fixtures/acuant_responses/get_results_response_success.json b/spec/fixtures/acuant_responses/get_results_response_success.json deleted file mode 100644 index cf4b5774265..00000000000 --- a/spec/fixtures/acuant_responses/get_results_response_success.json +++ /dev/null @@ -1,1868 +0,0 @@ -{ - "Alerts": [ - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was not found", - "FieldReferences": [], - "Id": "4add9651-27ed-40a2-90eb-7fa46a694156", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "b684bbda-bed3-4ffa-9dd9-99d9711830ea" - ], - "Result": 2 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was not found", - "FieldReferences": [], - "Id": "ad33e5c9-fc0c-413f-8c9f-02091f40a4c6", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "44cb9c08-71d1-4ba6-ab11-9707f39da5a2" - ], - "Result": 2 - }, - { - "Actions": "Verify that the data extracted from the 2D barcode appears to be correct and matches the data present on the front of the document.", - "DataFieldReferences": [], - "Description": "Checked the contents of the two-dimensional barcode on the document.", - "Disposition": "The 2D barcode is formatted correctly", - "FieldReferences": [], - "Id": "70f4d854-a948-4a57-8108-54dc8a92efae", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is read but cannot be correctly decoded. This failure could be caused by if the 2D barcode was incorrectly encoded, either inadvertently due to a manufacturing problem or intentionally.", - "Key": "2D Barcode Content", - "Name": "2D Barcode Content", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The 2D barcode on the could not be read or may be missing. Confirm that it is present, is not obstructed with any foreign material (e.g., dirt, labels, stickers), and is not excessively cracked or worn.", - "DataFieldReferences": [], - "Description": "Verified that the two-dimensional barcode on the document was read successfully.", - "Disposition": "The 2D barcode was read successfully", - "FieldReferences": [], - "Id": "bf9cb1c4-1a74-430f-9027-ea1cb1bbeb76", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is expected but could not be read successfully. This could be caused by a 2D barcode that is dirty, in poor condition, or is covered by a foreign material such as a sticker. It is also possible that the 2D barcode could be invalid or a poor quality replication of an authentic barcode.", - "Key": "2D Barcode Read", - "Name": "2D Barcode Read", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "c66ef71d-0eee-456b-a5c4-935a193287f8" - ], - "Description": "Compare the machine-readable birth date field to the human-readable birth date field.", - "Disposition": "The birth dates match", - "FieldReferences": [], - "Id": "c90a4ad0-73e6-4f78-a4b2-5d19836ec6a6", - "ImageReferences": [], - "Information": "The birth date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Birth Date Crosscheck", - "Name": "Birth Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date on the document may have been misread. Confirm that it is legible.", - "DataFieldReferences": [], - "Description": "Verified that the birth date is valid.", - "Disposition": "The birth date is valid", - "FieldReferences": [ - "1c36b00c-d0d6-4d70-b5c2-0b1d71b09c30" - ], - "Id": "5ff20f0e-9640-4928-a5c0-1bb14b2cc8ea", - "ImageReferences": [], - "Information": "Verified that the birth date is valid, in the expected format, and occurs on or before the current date and not outside a reasonable range.", - "Key": "Birth Date Valid", - "Name": "Birth Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "This test may fail if a document cannot be successfully classified as a supported document type. This may occur if the document is fraudulent as some fraudulent documents differ so much from authentic documents that they will not be recognized as that type of document. This may also occur if a valid document is significantly worn or damaged or if the document is of a new or different type that is not yet supported by the library. The document should be examined manually.", - "DataFieldReferences": [], - "Description": "Verified that the type of document is supported and is able to be fully authenticated.", - "Disposition": "The document type is supported", - "FieldReferences": [], - "Id": "5612917d-376c-488b-bfa3-be4d23fb7fa3", - "ImageReferences": [], - "Information": "Verified that the document is recognized as a supported document type and that the type of document can be fully authenticated.", - "Key": "Document Classification", - "Name": "Document Classification", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Several crosschecks are failing. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [], - "Description": "Compared the machine-readable fields to the human-readable fields.", - "Disposition": "There are not a large number of differences between electronic and human-readable data sources", - "FieldReferences": [], - "Id": "2dae7070-3301-4d51-b525-bf62ab78fac3", - "ImageReferences": [], - "Information": "There are multiple sources of data on the document. This test verifies that there are not widespread differences in data between data sources, which can indicate a fake or tampered document.", - "Key": "Document Crosscheck Aggregation", - "Name": "Document Crosscheck Aggregation", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs on or after the current date. Also confirm that the current date and time of the host computer is correctly set.", - "DataFieldReferences": [], - "Description": "Checked if the document is expired.", - "Disposition": "The document has not expired", - "FieldReferences": [ - "f2b99962-ba02-47a5-afb1-398b5c413499" - ], - "Id": "ff9c8131-aa30-48ef-8eb5-a9d0749d82d0", - "ImageReferences": [], - "Information": "Verified that the document expiration date does not occur before the current date.", - "Key": "Document Expired", - "Name": "Document Expired", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The document number field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "4c2fd852-4026-4118-8cda-f581173472bf", - "b799881f-7af8-4397-8b5b-953abc9b3677" - ], - "Description": "Compare the machine-readable document number field to the human-readable document number field.", - "Disposition": "The document numbers match", - "FieldReferences": [], - "Id": "c681ec7a-4f73-40c4-a07d-df3cac8acdaf", - "ImageReferences": [], - "Information": "The document number is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Document Number Crosscheck", - "Name": "Document Number Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "fdeb031a-4a54-4261-9784-9de902cea941" - ], - "Description": "Compare the machine-readable expiration date field to the human-readable expiration date field.", - "Disposition": "The expiration dates match", - "FieldReferences": [], - "Id": "4aa2074e-2970-45ac-ba24-4d3c2081214a", - "ImageReferences": [], - "Information": "The expiration date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Expiration Date Crosscheck", - "Name": "Expiration Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs after the issue and birth dates.", - "DataFieldReferences": [], - "Description": "Verified that the expiration date is valid.", - "Disposition": "The expiration date is valid", - "FieldReferences": [ - "f2b99962-ba02-47a5-afb1-398b5c413499" - ], - "Id": "e616959e-689d-4d4f-afd4-cf4a72ab5783", - "ImageReferences": [], - "Information": "Verified that the document expiration date is valid, in the expected format, and occurs after the issue and birth dates.", - "Key": "Expiration Date Valid", - "Name": "Expiration Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The given name and/or surname fields on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "b57ec4fb-9002-4196-a1f5-82ef1afc4113" - ], - "Description": "Compare the machine-readable full name field to the human-readable full name field.", - "Disposition": "The full names match", - "FieldReferences": [], - "Id": "923d2ac1-a74a-4ad3-8fd7-346e4f41a3bd", - "ImageReferences": [], - "Information": "The full name is composed of the given name and the surname. These items are present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Full Name Crosscheck", - "Name": "Full Name Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Examine the data regions of the document for any visible indications that the data has been digitally manipulated. Request a new image, if possible, to repeat the test.", - "DataFieldReferences": [], - "Description": "Examines a document image for evidence of tampering or digital manipulation.", - "Disposition": "No evidence of tampering or digital manipulation was detected.", - "FieldReferences": [], - "Id": "0324313a-b342-448d-b182-5c1e546d4d16", - "ImageReferences": [], - "Information": "Tested the document image for evidence of tampering or digital manipulation.", - "Key": "Image Tampering Check", - "Name": "Image Tampering Check", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The issue date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "a85ab0b5-e33d-4cfc-9084-6513108a1036" - ], - "Description": "Compare the machine-readable issue date field to the human-readable issue date field.", - "Disposition": "The issue dates match", - "FieldReferences": [], - "Id": "655d9942-5424-4dc4-90b8-3bcebdadba2b", - "ImageReferences": [], - "Information": "The issue date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Issue Date Crosscheck", - "Name": "Issue Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The issue date on the document may have been misread. Confirm that all of the dates are legible, the issue date occurs on or before the current date, and is before the expiration date.", - "DataFieldReferences": [], - "Description": "Verified that the issue date is valid.", - "Disposition": "The issue date is valid", - "FieldReferences": [ - "cf88e817-c6e9-464f-8d8b-c5bf0e4d742d" - ], - "Id": "11c61d82-1373-4133-8fe5-dc27f65c4c13", - "ImageReferences": [], - "Information": "Verified that the document issue date is valid, in the expected format, does not occur in the future, does not occur before the date of birth, and does not occur after the expiration date.", - "Key": "Issue Date Valid", - "Name": "Issue Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The sex field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "d1b20071-682b-46fd-9fa3-6d15e1585300", - "193695a9-946d-428d-9d1d-82fa2737414f" - ], - "Description": "Compare the machine-readable sex field to the human-readable sex field.", - "Disposition": "The sexes match", - "FieldReferences": [], - "Id": "685459ce-c0bf-4c5f-a84b-3fcfea703b7b", - "ImageReferences": [], - "Information": "The sex field is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Sex Crosscheck", - "Name": "Sex Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "a7bc6bc6-711d-4668-9bb0-1409bd22dc2d", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "11eeb3c3-8c92-4c91-bdb1-28cf2631f278" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "0ff4615a-37ab-4796-9439-a87972940bb6", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "bdab7938-b938-4248-b881-ff01f4f18f10" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "22f10d02-5910-47ab-aa43-4eae89f3a4ed", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "51bf3805-653c-4445-859f-2b96e28aeb0a" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "48363ef5-dfbf-4062-ad70-a72fa62c0ffb", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "216177ee-7232-49f2-9608-b991f4c1b255" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "fce7eb32-2adb-4f5c-b895-02250cde4802", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "dfeb1e30-d410-402b-b3d7-dbe2d0f70e53" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "61fccc48-c232-49a9-a37b-2826f66b13b0", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "c6a2c733-3ee7-47d9-aff6-6f158731a3a2" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "c680b1b1-7447-43af-b0c4-6011c48d65f9", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "afbf1d5a-b510-4ca3-8f94-9e302d5f9dbc" - ], - "Result": 1 - } - ], - "AuthenticationSensitivity": 0, - "Biographic": { - "Age": 36, - "BirthDate": "/Date(449625600000)/", - "ExpirationDate": "/Date(1666569600000)/", - "FullName": "JANE DOE", - "Gender": 2, - "Photo": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Photo" - }, - "Classification": { - "ClassificationDetails": { - "Back": { - "Class": 4, - "ClassCode": null, - "ClassName": "Identification Card", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "a77a279a-e1cf-4cb9-acd1-aacf4390db68", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Back", - "IssuerCode": "ND", - "IssuerName": "North Dakota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "North Dakota (ND) Back", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - }, - "Front": { - "Class": 4, - "ClassCode": null, - "ClassName": "Identification Card", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "1db1d91b-4cb1-4d77-958d-1707eb0c7c42", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Non-Driver Identification Card", - "IssuerCode": "ND", - "IssuerName": "North Dakota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "North Dakota (ND) Non-Driver Identification Card", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "Mode": 0, - "OrientationChanged": false, - "PresentationChanged": false, - "Type": { - "Class": 4, - "ClassCode": null, - "ClassName": "Identification Card", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "1db1d91b-4cb1-4d77-958d-1707eb0c7c42", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Non-Driver Identification Card", - "IssuerCode": "ND", - "IssuerName": "North Dakota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "North Dakota (ND) Non-Driver Identification Card", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "DataFields": [ - { - "DataSource": 1, - "Description": "Raw data extracted from the 1D barcode of the document", - "Id": "5bf10958-9025-48f6-9e28-8eb4068ee45c", - "IsImage": false, - "Key": "1D Barcode", - "Name": "1D Barcode", - "RegionOfInterest": { - "height": 486, - "width": 152, - "x": 3, - "y": 186 - }, - "RegionReference": "cc56bfc3-f838-4e90-aba8-61cecc6092e5", - "Reliability": 1, - "Type": "string", - "Value": "0340078165114232" - }, - { - "DataSource": 2, - "Description": "The person's legal, residence, or mailing address", - "Id": "2116037e-9e9d-4e82-8ad7-d3cedbd63e6e", - "IsImage": false, - "Key": "2D Address", - "Name": "Address", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "1000 E AVENUE EBISMARCK, ND 58501" - }, - { - "DataSource": 2, - "Description": "City of the person's legal, residence, or mailing address", - "Id": "f4beefb6-4355-4658-b9e9-05145af35ab9", - "IsImage": false, - "Key": "2D Address City", - "Name": "Address City", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "BISMARCK" - }, - { - "DataSource": 2, - "Description": "First address line of the person's legal, residence, or mailing address", - "Id": "36a794d9-a6b4-415f-9245-2a669e939a84", - "IsImage": false, - "Key": "2D Address Line 1", - "Name": "Address Line 1", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "1000 E AVENUE E" - }, - { - "DataSource": 2, - "Description": "Second address line of the person's legal, residence, or mailing address", - "Id": "645d1c0a-eac9-4d21-a308-430205a7a49a", - "IsImage": false, - "Key": "2D Address Line 2", - "Name": "Address Line 2", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "APT E" - }, - { - "DataSource": 2, - "Description": "Postal code of the person's address", - "Id": "208d17a8-6056-4ccf-b89d-b904c27e50c1", - "IsImage": false, - "Key": "2D Address Postal Code", - "Name": "Address Postal Code", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "58501" - }, - { - "DataSource": 2, - "Description": "State of the person's legal, residence, or mailing address", - "Id": "7aea3bca-a2c0-482f-9e1b-5a4037a7e326", - "IsImage": false, - "Key": "2D Address State", - "Name": "Address State", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "ND" - }, - { - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "IsImage": false, - "Key": "2D Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataSource": 2, - "Description": "A 16-digit document discriminator code that uniquely identifies where and when a U.S. or Canadian ID was issued", - "Id": "2151bee6-4688-4b6b-bb83-08cf2ee5be2a", - "IsImage": false, - "Key": "2D DD Number", - "Name": "DD Number", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "8DOE841165DJ52224JE67NYZ" - }, - { - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "4c2fd852-4026-4118-8cda-f581173472bf", - "IsImage": false, - "Key": "2D Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "DOE-84-1165" - }, - { - "DataSource": 2, - "Description": "Date that the document will expire", - "Id": "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "IsImage": false, - "Key": "2D Expiration Date", - "Name": "Expiration Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataSource": 2, - "Description": "The person's eye color", - "Id": "9e68c7b1-b0d9-4e07-9b74-62b7abd52e38", - "IsImage": false, - "Key": "2D Eye Color", - "Name": "Eye Color", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "BROWN" - }, - { - "DataSource": 2, - "Description": "The person's first name", - "Id": "635d7d60-e7f2-4860-b8f6-1c56ae664a18", - "IsImage": false, - "Key": "2D First Name", - "Name": "First Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "IsImage": false, - "Key": "2D Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataSource": 2, - "Description": "The person's given name", - "Id": "74962a67-44f9-402b-b750-c984a9b55180", - "IsImage": false, - "Key": "2D Given Name", - "Name": "Given Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 2, - "Description": "The person's height ", - "Id": "e3e13977-2d12-4538-9542-5b2f157f3ab3", - "IsImage": false, - "Key": "2D Height", - "Name": "Height", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "5' 7\"" - }, - { - "DataSource": 2, - "Description": "Date that the document was issued", - "Id": "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "IsImage": false, - "Key": "2D Issue Date", - "Name": "Issue Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataSource": 2, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "0783e234-96cc-46b4-bc82-c2aaa4b9f7d7", - "IsImage": false, - "Key": "2D Issuing State Code", - "Name": "Issuing State Code", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "ND" - }, - { - "DataSource": 2, - "Description": "Full name of the state or country that issued the document", - "Id": "39f0f97c-0dd1-4c22-b0b9-2320f7f76e95", - "IsImage": false, - "Key": "2D Issuing State Name", - "Name": "Issuing State Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "NORTH DAKOTA" - }, - { - "DataSource": 2, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "d1b20071-682b-46fd-9fa3-6d15e1585300", - "IsImage": false, - "Key": "2D Sex", - "Name": "Sex", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "F" - }, - { - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "5f02ed1f-2768-496c-b39b-7984201c85e4", - "IsImage": false, - "Key": "2D Surname", - "Name": "Surname", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "DOE" - }, - { - "DataSource": 2, - "Description": "Raw data extracted from the 2D barcode of the document", - "Id": "dfc52064-ab36-46e1-ba01-32d9d4e53ba4", - "IsImage": false, - "Key": "Data_2DBarcode", - "Name": "2D Barcode Data", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "08940735-c61c-45e3-b0a1-438151b0f9f9", - "Reliability": 0.99, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Data?type=Barcode2D" - }, - { - "DataSource": 6, - "Description": "The person's legal, residence, or mailing address", - "Id": "0e793dce-87d3-41c5-a111-c6c31c403439", - "IsImage": false, - "Key": "VIZ Address", - "Name": "Address", - "RegionOfInterest": { - "height": 88, - "width": 503, - "x": 14, - "y": 4 - }, - "RegionReference": "0b27a062-d7b1-42a6-be51-17c225958efd", - "Reliability": 0.4422222375869751, - "Type": "string", - "Value": "1000 E AVENUESBISMARCK ND 58501" - }, - { - "DataSource": 6, - "Description": "The person's date of birth", - "Id": "c66ef71d-0eee-456b-a5c4-935a193287f8", - "IsImage": false, - "Key": "VIZ Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 3, - "y": 5 - }, - "RegionReference": "3b61ac0c-24ad-41fd-bd8d-380f4b803f5e", - "Reliability": 0.5327273011207581, - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataSource": 6, - "Description": "A number that identifies a document", - "Id": "b799881f-7af8-4397-8b5b-953abc9b3677", - "IsImage": false, - "Key": "VIZ Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 61, - "width": 497, - "x": 19, - "y": 21 - }, - "RegionReference": "8b14ac1b-736b-4dd8-a132-f3a61cd526e2", - "Reliability": 0.7241666913032532, - "Type": "string", - "Value": "D0E-84-1165" - }, - { - "DataSource": 6, - "Description": "Date that the document will expire", - "Id": "fdeb031a-4a54-4261-9784-9de902cea941", - "IsImage": false, - "Key": "VIZ Expiration Date", - "Name": "Expiration Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 4, - "y": 6 - }, - "RegionReference": "f42e724e-a8be-4362-a3a2-ab3be86ec0fd", - "Reliability": 0.7127272486686707, - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataSource": 6, - "Description": "The person's eye color", - "Id": "b397bd37-fcb0-4dd6-9a1f-669c8a7f8c86", - "IsImage": false, - "Key": "VIZ Eye Color", - "Name": "Eye Color", - "RegionOfInterest": { - "height": 42, - "width": 122, - "x": 14, - "y": 18 - }, - "RegionReference": "7681e29d-a1cb-491f-9094-2227cef980f1", - "Reliability": 0.45499998331069946, - "Type": "string", - "Value": "BRO" - }, - { - "DataSource": 6, - "Description": "The person's full name (given name plus surname)", - "Id": "b57ec4fb-9002-4196-a1f5-82ef1afc4113", - "IsImage": false, - "Key": "VIZ Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.45399999618530273, - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataSource": 6, - "Description": "The person's given name", - "Id": "545cec08-745b-45b5-9d61-bf4ea81a9c06", - "IsImage": false, - "Key": "VIZ Given Name", - "Name": "Given Name", - "RegionOfInterest": { - "height": 47, - "width": 169, - "x": 14, - "y": 19 - }, - "RegionReference": "6b3fa1cb-cc5a-4472-9e03-ba8a88480b45", - "Reliability": 0.45399999618530273, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 6, - "Description": "The person's height ", - "Id": "40656c40-063d-47ed-845b-6c4b0c4d968a", - "IsImage": false, - "Key": "VIZ Height", - "Name": "Height", - "RegionOfInterest": { - "height": 44, - "width": 155, - "x": 34, - "y": 23 - }, - "RegionReference": "7849bc90-c54d-4db8-bf0b-652e8fa7986c", - "Reliability": 0.38499999046325684, - "Type": "string", - "Value": "5'-07''" - }, - { - "DataSource": 6, - "Description": "Date that the document was issued", - "Id": "a85ab0b5-e33d-4cfc-9084-6513108a1036", - "IsImage": false, - "Key": "VIZ Issue Date", - "Name": "Issue Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 4, - "y": 4 - }, - "RegionReference": "c3c5ff38-6fb3-45a4-92a0-e122e7651e62", - "Reliability": 0.6909090876579285, - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataSource": 6, - "Description": "A person's image", - "Id": "79548f2e-f92a-4700-8164-09fb6253ccfd", - "IsImage": true, - "Key": "VIZ Photo", - "Name": "Photo", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "e5d4c929-cb0d-471d-9148-e44b29ba0fd5", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=VIZ%20Photo" - }, - { - "DataSource": 6, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "193695a9-946d-428d-9d1d-82fa2737414f", - "IsImage": false, - "Key": "VIZ Sex", - "Name": "Sex", - "RegionOfInterest": { - "height": 14, - "width": 11, - "x": 8, - "y": 8 - }, - "RegionReference": "34023311-b4ac-47dc-8948-0616429bee7d", - "Reliability": 0.6700000166893005, - "Type": "string", - "Value": "F" - }, - { - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "3663bf8d-c5be-4c69-bb3d-8db799adee06", - "IsImage": true, - "Key": "VIZ Signature", - "Name": "Signature", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "7974e0dd-46cb-47eb-8557-530a235ca1c2", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=VIZ%20Signature" - }, - { - "DataSource": 6, - "Description": "The person's surname or family name", - "Id": "39fa1c10-7d63-4cb5-a085-bad2f8efb56b", - "IsImage": false, - "Key": "VIZ Surname", - "Name": "Surname", - "RegionOfInterest": { - "height": 61, - "width": 169, - "x": 13, - "y": 11 - }, - "RegionReference": "8a131204-4c8b-4177-a6f0-c69cec29038f", - "Reliability": 0.9049999713897705, - "Type": "string", - "Value": "DOE" - } - ], - "Device": { - "HasContactlessChipReader": false, - "HasMagneticStripeReader": false, - "SerialNumber": "xxxxx", - "Type": { - "Manufacturer": "Login.gov", - "Model": "Doc Auth 1.0", - "SensorType": 3 - } - }, - "EngineVersion": "2.15.1.171", - "Fields": [ - { - "DataFieldReferences": [ - "2116037e-9e9d-4e82-8ad7-d3cedbd63e6e", - "0e793dce-87d3-41c5-a111-c6c31c403439" - ], - "DataSource": 2, - "Description": "The person's legal, residence, or mailing address", - "Id": "3591a27c-d2d7-4500-804d-03a7269ba56b", - "IsImage": false, - "Key": "Address", - "Name": "Address", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "1000 E AVENUE E APT E BISMARCK, ND 58501" - }, - { - "DataFieldReferences": [ - "f4beefb6-4355-4658-b9e9-05145af35ab9" - ], - "DataSource": 2, - "Description": "City of the person's legal, residence, or mailing address", - "Id": "eded49f2-1b8e-48aa-ac2f-a00205f09d5a", - "IsImage": false, - "Key": "Address City", - "Name": "Address City", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "BISMARCK" - }, - { - "DataFieldReferences": [ - "36a794d9-a6b4-415f-9245-2a669e939a84" - ], - "DataSource": 2, - "Description": "First address line of the person's legal, residence, or mailing address", - "Id": "c721ba18-8118-414a-8221-940bf60c71e2", - "IsImage": false, - "Key": "Address Line 1", - "Name": "Address Line 1", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "1000 E AVENUE E" - }, - { - "DataFieldReferences": [ - "645d1c0a-eac9-4d21-a308-430205a7a49a" - ], - "DataSource": 2, - "Description": "Second address line of the person's legal, residence, or mailing address", - "Id": "f541c1cc-9f98-4131-a92b-0049b6126acd", - "IsImage": false, - "Key": "Address Line 2", - "Name": "Address Line 2", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "APT E" - }, - { - "DataFieldReferences": [ - "208d17a8-6056-4ccf-b89d-b904c27e50c1" - ], - "DataSource": 2, - "Description": "Postal code of the person's address", - "Id": "d8448c25-89c8-46c0-84b3-a350e8473540", - "IsImage": false, - "Key": "Address Postal Code", - "Name": "Address Postal Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "58501" - }, - { - "DataFieldReferences": [ - "7aea3bca-a2c0-482f-9e1b-5a4037a7e326" - ], - "DataSource": 2, - "Description": "State of the person's legal, residence, or mailing address", - "Id": "9eb9bcff-a742-4ac8-a5ce-35db18b1df63", - "IsImage": false, - "Key": "Address State", - "Name": "Address State", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "ND" - }, - { - "DataFieldReferences": [ - "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "c66ef71d-0eee-456b-a5c4-935a193287f8" - ], - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "1c36b00c-d0d6-4d70-b5c2-0b1d71b09c30", - "IsImage": false, - "Key": "Birth Date", - "Name": "Birth Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataFieldReferences": [ - "2151bee6-4688-4b6b-bb83-08cf2ee5be2a" - ], - "DataSource": 2, - "Description": "A 16-digit document discriminator code that uniquely identifies where and when a U.S. or Canadian ID was issued", - "Id": "96b2f01b-19df-46e6-8682-268462976c2a", - "IsImage": false, - "Key": "DD Number", - "Name": "DD Number", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "8DOE841165DJ52224JE67NYZ" - }, - { - "DataFieldReferences": [], - "DataSource": 7, - "Description": "The localized version of the document class of the document type", - "Id": "8142c01b-cf85-47da-9f3e-dc97c24f1758", - "IsImage": false, - "Key": "Document Class Name", - "Name": "Document Class Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "Identification Card" - }, - { - "DataFieldReferences": [ - "4c2fd852-4026-4118-8cda-f581173472bf", - "b799881f-7af8-4397-8b5b-953abc9b3677" - ], - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "ee3140d8-6334-4608-ad17-a7bf42a7ddf5", - "IsImage": false, - "Key": "Document Number", - "Name": "Document Number", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "DOE-84-1165" - }, - { - "DataFieldReferences": [ - "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "fdeb031a-4a54-4261-9784-9de902cea941" - ], - "DataSource": 2, - "Description": "Date that the document will expire", - "Id": "f2b99962-ba02-47a5-afb1-398b5c413499", - "IsImage": false, - "Key": "Expiration Date", - "Name": "Expiration Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataFieldReferences": [ - "9e68c7b1-b0d9-4e07-9b74-62b7abd52e38", - "b397bd37-fcb0-4dd6-9a1f-669c8a7f8c86" - ], - "DataSource": 2, - "Description": "The person's eye color", - "Id": "1b6cc8ec-7754-4fc4-99d3-f0a1d861501c", - "IsImage": false, - "Key": "Eye Color", - "Name": "Eye Color", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "BROWN" - }, - { - "DataFieldReferences": [ - "635d7d60-e7f2-4860-b8f6-1c56ae664a18" - ], - "DataSource": 2, - "Description": "The person's first name", - "Id": "0e664710-decb-44d5-a638-0b9396f57bdf", - "IsImage": false, - "Key": "First Name", - "Name": "First Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE" - }, - { - "DataFieldReferences": [ - "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "b57ec4fb-9002-4196-a1f5-82ef1afc4113" - ], - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "e575acd5-a304-4828-8b6e-38b4f928c1ae", - "IsImage": false, - "Key": "Full Name", - "Name": "Full Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataFieldReferences": [ - "74962a67-44f9-402b-b750-c984a9b55180", - "545cec08-745b-45b5-9d61-bf4ea81a9c06" - ], - "DataSource": 2, - "Description": "The person's given name", - "Id": "b0c71cc8-47d8-47f1-bc54-509e558e8b92", - "IsImage": false, - "Key": "Given Name", - "Name": "Given Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE" - }, - { - "DataFieldReferences": [ - "e3e13977-2d12-4538-9542-5b2f157f3ab3", - "40656c40-063d-47ed-845b-6c4b0c4d968a" - ], - "DataSource": 2, - "Description": "The person's height ", - "Id": "7d25c868-2d67-4148-b193-8c6d312594aa", - "IsImage": false, - "Key": "Height", - "Name": "Height", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "5' 7\"" - }, - { - "DataFieldReferences": [ - "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "a85ab0b5-e33d-4cfc-9084-6513108a1036" - ], - "DataSource": 2, - "Description": "Date that the document was issued", - "Id": "cf88e817-c6e9-464f-8d8b-c5bf0e4d742d", - "IsImage": false, - "Key": "Issue Date", - "Name": "Issue Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataFieldReferences": [ - "0783e234-96cc-46b4-bc82-c2aaa4b9f7d7" - ], - "DataSource": 7, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "9cb81d4f-1eae-4104-b1e1-43efc6b8d9b9", - "IsImage": false, - "Key": "Issuing State Code", - "Name": "Issuing State Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "ND" - }, - { - "DataFieldReferences": [ - "39f0f97c-0dd1-4c22-b0b9-2320f7f76e95" - ], - "DataSource": 7, - "Description": "Full name of the state or country that issued the document", - "Id": "c22f6f70-4bec-4b16-a604-d65fc155f845", - "IsImage": false, - "Key": "Issuing State Name", - "Name": "Issuing State Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "North Dakota" - }, - { - "DataFieldReferences": [ - "79548f2e-f92a-4700-8164-09fb6253ccfd" - ], - "DataSource": 6, - "Description": "A person's image", - "Id": "bcf8dd88-1859-40e0-977a-567796167ec9", - "IsImage": true, - "Key": "Photo", - "Name": "Photo", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Photo" - }, - { - "DataFieldReferences": [ - "d1b20071-682b-46fd-9fa3-6d15e1585300", - "193695a9-946d-428d-9d1d-82fa2737414f" - ], - "DataSource": 2, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "11297afa-e41e-45ae-85af-aef0499be70d", - "IsImage": false, - "Key": "Sex", - "Name": "Sex", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "F" - }, - { - "DataFieldReferences": [ - "3663bf8d-c5be-4c69-bb3d-8db799adee06" - ], - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "4eea0344-2a27-4945-a803-68cb94966dac", - "IsImage": true, - "Key": "Signature", - "Name": "Signature", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Signature" - }, - { - "DataFieldReferences": [ - "5f02ed1f-2768-496c-b39b-7984201c85e4", - "39fa1c10-7d63-4cb5-a085-bad2f8efb56b" - ], - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "954993cb-49df-4626-a817-bbbc372d36d7", - "IsImage": false, - "Key": "Surname", - "Name": "Surname", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "DOE" - } - ], - "Images": [ - { - "GlareMetric": null, - "HorizontalResolution": 600, - "Id": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "IsCropped": true, - "IsTampered": false, - "Light": 0, - "MimeType": "image/vnd.ms-photo", - "SharpnessMetric": null, - "Side": 0, - "Uri": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Image?side=Front&light=White", - "VerticalResolution": 600 - }, - { - "GlareMetric": null, - "HorizontalResolution": 600, - "Id": "6954e69a-e35f-473f-9579-e1da226a8721", - "IsCropped": true, - "IsTampered": false, - "Light": 0, - "MimeType": "image/vnd.ms-photo", - "SharpnessMetric": null, - "Side": 1, - "Uri": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Image?side=Back&light=White", - "VerticalResolution": 600 - } - ], - "InstanceId": "7748c634-a2ab-4f3a-a901-39084ada8093", - "LibraryVersion": "20.05.07.182", - "ProcessMode": 2, - "Regions": [ - { - "DocumentElement": 3, - "Id": "cc56bfc3-f838-4e90-aba8-61cecc6092e5", - "ImageReference": "6954e69a-e35f-473f-9579-e1da226a8721", - "Key": "1D Barcode", - "Rectangle": { - "height": 889, - "width": 183, - "x": 0, - "y": 205 - } - }, - { - "DocumentElement": 3, - "Id": "08940735-c61c-45e3-b0a1-438151b0f9f9", - "ImageReference": "6954e69a-e35f-473f-9579-e1da226a8721", - "Key": "2D Barcode", - "Rectangle": { - "height": 524, - "width": 1794, - "x": 219, - "y": 24 - } - }, - { - "DocumentElement": 3, - "Id": "0b27a062-d7b1-42a6-be51-17c225958efd", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Address", - "Rectangle": { - "height": 168, - "width": 1260, - "x": 732, - "y": 580 - } - }, - { - "DocumentElement": 3, - "Id": "3b61ac0c-24ad-41fd-bd8d-380f4b803f5e", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Birth Date", - "Rectangle": { - "height": 97, - "width": 427, - "x": 872, - "y": 847 - } - }, - { - "DocumentElement": 4, - "Id": "dfeb1e30-d410-402b-b3d7-dbe2d0f70e53", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Date Font", - "Rectangle": { - "height": 285, - "width": 449, - "x": 846, - "y": 840 - } - }, - { - "DocumentElement": 3, - "Id": "8b14ac1b-736b-4dd8-a132-f3a61cd526e2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Document Number", - "Rectangle": { - "height": 114, - "width": 719, - "x": 872, - "y": 736 - } - }, - { - "DocumentElement": 4, - "Id": "2731d8b0-f42e-43ab-b668-2e784ae6dbf7", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Document Type", - "Rectangle": { - "height": 183, - "width": 675, - "x": 1085, - "y": 97 - } - }, - { - "DocumentElement": 3, - "Id": "f42e724e-a8be-4362-a3a2-ab3be86ec0fd", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Expiration Date", - "Rectangle": { - "height": 93, - "width": 433, - "x": 870, - "y": 1014 - } - }, - { - "DocumentElement": 4, - "Id": "216177ee-7232-49f2-9608-b991f4c1b255", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Expiration Date Label", - "Rectangle": { - "height": 134, - "width": 223, - "x": 689, - "y": 997 - } - }, - { - "DocumentElement": 3, - "Id": "7681e29d-a1cb-491f-9094-2227cef980f1", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Eye Color", - "Rectangle": { - "height": 71, - "width": 179, - "x": 1512, - "y": 1028 - } - }, - { - "DocumentElement": 4, - "Id": "b684bbda-bed3-4ffa-9dd9-99d9711830ea", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Eyes Label Pattern", - "Rectangle": { - "height": 107, - "width": 273, - "x": 1301, - "y": 1009 - } - }, - { - "DocumentElement": 5, - "Id": "11eeb3c3-8c92-4c91-bdb1-28cf2631f278", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Flag Pattern", - "Rectangle": { - "height": 275, - "width": 391, - "x": 2, - "y": 2 - } - }, - { - "DocumentElement": 3, - "Id": "6b3fa1cb-cc5a-4472-9e03-ba8a88480b45", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Given Name", - "Rectangle": { - "height": 84, - "width": 1258, - "x": 732, - "y": 502 - } - }, - { - "DocumentElement": 4, - "Id": "cfc9ae0a-cab8-4d55-a5ac-10f291410152", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Header", - "Rectangle": { - "height": 292, - "width": 871, - "x": 278, - "y": 8 - } - }, - { - "DocumentElement": 4, - "Id": "44cb9c08-71d1-4ba6-ab11-9707f39da5a2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Header Left", - "Rectangle": { - "height": 332, - "width": 324, - "x": 280, - "y": 2 - } - }, - { - "DocumentElement": 3, - "Id": "7849bc90-c54d-4db8-bf0b-652e8fa7986c", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Height", - "Rectangle": { - "height": 78, - "width": 219, - "x": 1490, - "y": 938 - } - }, - { - "DocumentElement": 4, - "Id": "c6a2c733-3ee7-47d9-aff6-6f158731a3a2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Height Font", - "Rectangle": { - "height": 85, - "width": 202, - "x": 1501, - "y": 942 - } - }, - { - "DocumentElement": 4, - "Id": "51bf3805-653c-4445-859f-2b96e28aeb0a", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Horses", - "Rectangle": { - "height": 189, - "width": 448, - "x": 1279, - "y": 248 - } - }, - { - "DocumentElement": 3, - "Id": "c3c5ff38-6fb3-45a4-92a0-e122e7651e62", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Issue Date", - "Rectangle": { - "height": 82, - "width": 433, - "x": 870, - "y": 936 - } - }, - { - "DocumentElement": 4, - "Id": "857ba82f-98e7-4465-8999-2502df10c3b9", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Lower Data Labels", - "Rectangle": { - "height": 538, - "width": 240, - "x": 646, - "y": 732 - } - }, - { - "DocumentElement": 4, - "Id": "afbf1d5a-b510-4ca3-8f94-9e302d5f9dbc", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Lower Data Labels Right", - "Rectangle": { - "height": 298, - "width": 159, - "x": 1282, - "y": 844 - } - }, - { - "DocumentElement": 4, - "Id": "bdab7938-b938-4248-b881-ff01f4f18f10", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Microprint", - "Rectangle": { - "height": 88, - "width": 631, - "x": 1199, - "y": 57 - } - }, - { - "DocumentElement": 2, - "Id": "e5d4c929-cb0d-471d-9148-e44b29ba0fd5", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Photo", - "Rectangle": { - "height": 822, - "width": 614, - "x": 78, - "y": 246 - } - }, - { - "DocumentElement": 3, - "Id": "34023311-b4ac-47dc-8948-0616429bee7d", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Sex", - "Rectangle": { - "height": 86, - "width": 81, - "x": 1499, - "y": 854 - } - }, - { - "DocumentElement": 2, - "Id": "7974e0dd-46cb-47eb-8557-530a235ca1c2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Signature", - "Rectangle": { - "height": 170, - "width": 610, - "x": 75, - "y": 1056 - } - }, - { - "DocumentElement": 3, - "Id": "8a131204-4c8b-4177-a6f0-c69cec29038f", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Surname", - "Rectangle": { - "height": 88, - "width": 1258, - "x": 734, - "y": 429 - } - } - ], - "Result": 1, - "Subscription": { - "DocumentProcessMode": 2, - "Id": "fake-subscription-id", - "IsActive": true, - "IsDevelopment": true, - "IsTrial": false, - "Name": "Dev GSA iProov", - "StorePII": false - }, - "TamperResult": 1, - "TamperSensitivity": 0 -} diff --git a/spec/fixtures/acuant_responses/get_results_response_success_tribal_id.json b/spec/fixtures/acuant_responses/get_results_response_success_tribal_id.json deleted file mode 100644 index 60f0042d2d4..00000000000 --- a/spec/fixtures/acuant_responses/get_results_response_success_tribal_id.json +++ /dev/null @@ -1,1868 +0,0 @@ -{ - "Alerts": [ - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was not found", - "FieldReferences": [], - "Id": "4add9651-27ed-40a2-90eb-7fa46a694156", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "b684bbda-bed3-4ffa-9dd9-99d9711830ea" - ], - "Result": 2 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was not found", - "FieldReferences": [], - "Id": "ad33e5c9-fc0c-413f-8c9f-02091f40a4c6", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "44cb9c08-71d1-4ba6-ab11-9707f39da5a2" - ], - "Result": 2 - }, - { - "Actions": "Verify that the data extracted from the 2D barcode appears to be correct and matches the data present on the front of the document.", - "DataFieldReferences": [], - "Description": "Checked the contents of the two-dimensional barcode on the document.", - "Disposition": "The 2D barcode is formatted correctly", - "FieldReferences": [], - "Id": "70f4d854-a948-4a57-8108-54dc8a92efae", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is read but cannot be correctly decoded. This failure could be caused by if the 2D barcode was incorrectly encoded, either inadvertently due to a manufacturing problem or intentionally.", - "Key": "2D Barcode Content", - "Name": "2D Barcode Content", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The 2D barcode on the could not be read or may be missing. Confirm that it is present, is not obstructed with any foreign material (e.g., dirt, labels, stickers), and is not excessively cracked or worn.", - "DataFieldReferences": [], - "Description": "Verified that the two-dimensional barcode on the document was read successfully.", - "Disposition": "The 2D barcode was read successfully", - "FieldReferences": [], - "Id": "bf9cb1c4-1a74-430f-9027-ea1cb1bbeb76", - "ImageReferences": [], - "Information": "This authentication will fail if a 2D barcode is expected but could not be read successfully. This could be caused by a 2D barcode that is dirty, in poor condition, or is covered by a foreign material such as a sticker. It is also possible that the 2D barcode could be invalid or a poor quality replication of an authentic barcode.", - "Key": "2D Barcode Read", - "Name": "2D Barcode Read", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "c66ef71d-0eee-456b-a5c4-935a193287f8" - ], - "Description": "Compare the machine-readable birth date field to the human-readable birth date field.", - "Disposition": "The birth dates match", - "FieldReferences": [], - "Id": "c90a4ad0-73e6-4f78-a4b2-5d19836ec6a6", - "ImageReferences": [], - "Information": "The birth date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Birth Date Crosscheck", - "Name": "Birth Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The birth date on the document may have been misread. Confirm that it is legible.", - "DataFieldReferences": [], - "Description": "Verified that the birth date is valid.", - "Disposition": "The birth date is valid", - "FieldReferences": [ - "1c36b00c-d0d6-4d70-b5c2-0b1d71b09c30" - ], - "Id": "5ff20f0e-9640-4928-a5c0-1bb14b2cc8ea", - "ImageReferences": [], - "Information": "Verified that the birth date is valid, in the expected format, and occurs on or before the current date and not outside a reasonable range.", - "Key": "Birth Date Valid", - "Name": "Birth Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "This test may fail if a document cannot be successfully classified as a supported document type. This may occur if the document is fraudulent as some fraudulent documents differ so much from authentic documents that they will not be recognized as that type of document. This may also occur if a valid document is significantly worn or damaged or if the document is of a new or different type that is not yet supported by the library. The document should be examined manually.", - "DataFieldReferences": [], - "Description": "Verified that the type of document is supported and is able to be fully authenticated.", - "Disposition": "The document type is supported", - "FieldReferences": [], - "Id": "5612917d-376c-488b-bfa3-be4d23fb7fa3", - "ImageReferences": [], - "Information": "Verified that the document is recognized as a supported document type and that the type of document can be fully authenticated.", - "Key": "Document Classification", - "Name": "Document Classification", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Several crosschecks are failing. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [], - "Description": "Compared the machine-readable fields to the human-readable fields.", - "Disposition": "There are not a large number of differences between electronic and human-readable data sources", - "FieldReferences": [], - "Id": "2dae7070-3301-4d51-b525-bf62ab78fac3", - "ImageReferences": [], - "Information": "There are multiple sources of data on the document. This test verifies that there are not widespread differences in data between data sources, which can indicate a fake or tampered document.", - "Key": "Document Crosscheck Aggregation", - "Name": "Document Crosscheck Aggregation", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs on or after the current date. Also confirm that the current date and time of the host computer is correctly set.", - "DataFieldReferences": [], - "Description": "Checked if the document is expired.", - "Disposition": "The document has not expired", - "FieldReferences": [ - "f2b99962-ba02-47a5-afb1-398b5c413499" - ], - "Id": "ff9c8131-aa30-48ef-8eb5-a9d0749d82d0", - "ImageReferences": [], - "Information": "Verified that the document expiration date does not occur before the current date.", - "Key": "Document Expired", - "Name": "Document Expired", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The document number field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "4c2fd852-4026-4118-8cda-f581173472bf", - "b799881f-7af8-4397-8b5b-953abc9b3677" - ], - "Description": "Compare the machine-readable document number field to the human-readable document number field.", - "Disposition": "The document numbers match", - "FieldReferences": [], - "Id": "c681ec7a-4f73-40c4-a07d-df3cac8acdaf", - "ImageReferences": [], - "Information": "The document number is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Document Number Crosscheck", - "Name": "Document Number Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "fdeb031a-4a54-4261-9784-9de902cea941" - ], - "Description": "Compare the machine-readable expiration date field to the human-readable expiration date field.", - "Disposition": "The expiration dates match", - "FieldReferences": [], - "Id": "4aa2074e-2970-45ac-ba24-4d3c2081214a", - "ImageReferences": [], - "Information": "The expiration date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Expiration Date Crosscheck", - "Name": "Expiration Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The expiration date on the document may have been misread. Confirm that it is legible and occurs after the issue and birth dates.", - "DataFieldReferences": [], - "Description": "Verified that the expiration date is valid.", - "Disposition": "The expiration date is valid", - "FieldReferences": [ - "f2b99962-ba02-47a5-afb1-398b5c413499" - ], - "Id": "e616959e-689d-4d4f-afd4-cf4a72ab5783", - "ImageReferences": [], - "Information": "Verified that the document expiration date is valid, in the expected format, and occurs after the issue and birth dates.", - "Key": "Expiration Date Valid", - "Name": "Expiration Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The given name and/or surname fields on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstructions.", - "DataFieldReferences": [ - "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "b57ec4fb-9002-4196-a1f5-82ef1afc4113" - ], - "Description": "Compare the machine-readable full name field to the human-readable full name field.", - "Disposition": "The full names match", - "FieldReferences": [], - "Id": "923d2ac1-a74a-4ad3-8fd7-346e4f41a3bd", - "ImageReferences": [], - "Information": "The full name is composed of the given name and the surname. These items are present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Full Name Crosscheck", - "Name": "Full Name Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Examine the data regions of the document for any visible indications that the data has been digitally manipulated. Request a new image, if possible, to repeat the test.", - "DataFieldReferences": [], - "Description": "Examines a document image for evidence of tampering or digital manipulation.", - "Disposition": "No evidence of tampering or digital manipulation was detected.", - "FieldReferences": [], - "Id": "0324313a-b342-448d-b182-5c1e546d4d16", - "ImageReferences": [], - "Information": "Tested the document image for evidence of tampering or digital manipulation.", - "Key": "Image Tampering Check", - "Name": "Image Tampering Check", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The issue date field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "a85ab0b5-e33d-4cfc-9084-6513108a1036" - ], - "Description": "Compare the machine-readable issue date field to the human-readable issue date field.", - "Disposition": "The issue dates match", - "FieldReferences": [], - "Id": "655d9942-5424-4dc4-90b8-3bcebdadba2b", - "ImageReferences": [], - "Information": "The issue date is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Issue Date Crosscheck", - "Name": "Issue Date Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The issue date on the document may have been misread. Confirm that all of the dates are legible, the issue date occurs on or before the current date, and is before the expiration date.", - "DataFieldReferences": [], - "Description": "Verified that the issue date is valid.", - "Disposition": "The issue date is valid", - "FieldReferences": [ - "cf88e817-c6e9-464f-8d8b-c5bf0e4d742d" - ], - "Id": "11c61d82-1373-4133-8fe5-dc27f65c4c13", - "ImageReferences": [], - "Information": "Verified that the document issue date is valid, in the expected format, does not occur in the future, does not occur before the date of birth, and does not occur after the expiration date.", - "Key": "Issue Date Valid", - "Name": "Issue Date Valid", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "The sex field on the document may have been misread due to dirt or wear. Confirm that the data from all visible sources match and are free of obstruction.", - "DataFieldReferences": [ - "d1b20071-682b-46fd-9fa3-6d15e1585300", - "193695a9-946d-428d-9d1d-82fa2737414f" - ], - "Description": "Compare the machine-readable sex field to the human-readable sex field.", - "Disposition": "The sexes match", - "FieldReferences": [], - "Id": "685459ce-c0bf-4c5f-a84b-3fcfea703b7b", - "ImageReferences": [], - "Information": "The sex field is present in multiple locations on this document (e.g., visual, 2D barcode, magnetic stripe, contactless smart card). This test compares this field between two or more of these sources to verify that they match.", - "Key": "Sex Crosscheck", - "Name": "Sex Crosscheck", - "RegionReferences": [], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "a7bc6bc6-711d-4668-9bb0-1409bd22dc2d", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "11eeb3c3-8c92-4c91-bdb1-28cf2631f278" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "0ff4615a-37ab-4796-9439-a87972940bb6", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "bdab7938-b938-4248-b881-ff01f4f18f10" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "22f10d02-5910-47ab-aa43-4eae89f3a4ed", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "51bf3805-653c-4445-859f-2b96e28aeb0a" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "48363ef5-dfbf-4062-ad70-a72fa62c0ffb", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "216177ee-7232-49f2-9608-b991f4c1b255" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "fce7eb32-2adb-4f5c-b895-02250cde4802", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "dfeb1e30-d410-402b-b3d7-dbe2d0f70e53" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "61fccc48-c232-49a9-a37b-2826f66b13b0", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "c6a2c733-3ee7-47d9-aff6-6f158731a3a2" - ], - "Result": 1 - }, - { - "Actions": "Check the visible (white) document image to verify the presence of the security feature. Possible reasons this test may fail for a valid document may be that the document was moving during the capture, or the document may be excessively worn or damaged.", - "DataFieldReferences": [], - "Description": "Verified the presence of a pattern on the visible image.", - "Disposition": "A visible pattern was found", - "FieldReferences": [], - "Id": "c680b1b1-7447-43af-b0c4-6011c48d65f9", - "ImageReferences": [], - "Information": "Verified that a security feature in the visible spectrum is present and in an expected location on the document.", - "Key": "Visible Pattern", - "Name": "Visible Pattern", - "RegionReferences": [ - "afbf1d5a-b510-4ca3-8f94-9e302d5f9dbc" - ], - "Result": 1 - } - ], - "AuthenticationSensitivity": 0, - "Biographic": { - "Age": 36, - "BirthDate": "/Date(449625600000)/", - "ExpirationDate": "/Date(1666569600000)/", - "FullName": "JANE DOE", - "Gender": 2, - "Photo": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Photo" - }, - "Classification": { - "ClassificationDetails": { - "Back": { - "Class": 4, - "ClassCode": null, - "ClassName": "Tribal Identification", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "a77a279a-e1cf-4cb9-acd1-aacf4390db68", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Back", - "IssuerCode": "ND", - "IssuerName": "Cowlitz Indian Tribe", - "IssuerType": 2, - "KeesingCode": null, - "Name": "Cowlitz Indian Tribe Back", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - }, - "Front": { - "Class": 4, - "ClassCode": null, - "ClassName": "Tribal Identification", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "1db1d91b-4cb1-4d77-958d-1707eb0c7c42", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Tribal Identification Card", - "IssuerCode": "ND", - "IssuerName": "Cowlitz Indian Tribe", - "IssuerType": 2, - "KeesingCode": null, - "Name": "Cowlitz Indian Tribe Tribal Identification", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "Mode": 0, - "OrientationChanged": false, - "PresentationChanged": false, - "Type": { - "Class": 4, - "ClassCode": null, - "ClassName": "Tribal Identification", - "CountryCode": "USA", - "GeographicRegions": [ - "NorthAmerica" - ], - "Id": "1db1d91b-4cb1-4d77-958d-1707eb0c7c42", - "IsGeneric": false, - "Issue": "2014", - "IssueType": "Tribal Identification Card", - "IssuerCode": "ND", - "IssuerName": "North Dakota", - "IssuerType": 2, - "KeesingCode": null, - "Name": "Cowlitz Indian Tribe Tribal Identification", - "Size": 1, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "DataFields": [ - { - "DataSource": 1, - "Description": "Raw data extracted from the 1D barcode of the document", - "Id": "5bf10958-9025-48f6-9e28-8eb4068ee45c", - "IsImage": false, - "Key": "1D Barcode", - "Name": "1D Barcode", - "RegionOfInterest": { - "height": 486, - "width": 152, - "x": 3, - "y": 186 - }, - "RegionReference": "cc56bfc3-f838-4e90-aba8-61cecc6092e5", - "Reliability": 1, - "Type": "string", - "Value": "0340078165114232" - }, - { - "DataSource": 2, - "Description": "The person's legal, residence, or mailing address", - "Id": "2116037e-9e9d-4e82-8ad7-d3cedbd63e6e", - "IsImage": false, - "Key": "2D Address", - "Name": "Address", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "1000 E AVENUE EBISMARCK, ND 58501" - }, - { - "DataSource": 2, - "Description": "City of the person's legal, residence, or mailing address", - "Id": "f4beefb6-4355-4658-b9e9-05145af35ab9", - "IsImage": false, - "Key": "2D Address City", - "Name": "Address City", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "BISMARCK" - }, - { - "DataSource": 2, - "Description": "First address line of the person's legal, residence, or mailing address", - "Id": "36a794d9-a6b4-415f-9245-2a669e939a84", - "IsImage": false, - "Key": "2D Address Line 1", - "Name": "Address Line 1", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "1000 E AVENUE E" - }, - { - "DataSource": 2, - "Description": "Second address line of the person's legal, residence, or mailing address", - "Id": "645d1c0a-eac9-4d21-a308-430205a7a49a", - "IsImage": false, - "Key": "2D Address Line 2", - "Name": "Address Line 2", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "APT E" - }, - { - "DataSource": 2, - "Description": "Postal code of the person's address", - "Id": "208d17a8-6056-4ccf-b89d-b904c27e50c1", - "IsImage": false, - "Key": "2D Address Postal Code", - "Name": "Address Postal Code", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "58501" - }, - { - "DataSource": 2, - "Description": "State of the person's legal, residence, or mailing address", - "Id": "7aea3bca-a2c0-482f-9e1b-5a4037a7e326", - "IsImage": false, - "Key": "2D Address State", - "Name": "Address State", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "ND" - }, - { - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "IsImage": false, - "Key": "2D Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataSource": 2, - "Description": "A 16-digit document discriminator code that uniquely identifies where and when a U.S. or Canadian ID was issued", - "Id": "2151bee6-4688-4b6b-bb83-08cf2ee5be2a", - "IsImage": false, - "Key": "2D DD Number", - "Name": "DD Number", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "8DOE841165DJ52224JE67NYZ" - }, - { - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "4c2fd852-4026-4118-8cda-f581173472bf", - "IsImage": false, - "Key": "2D Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "DOE-84-1165" - }, - { - "DataSource": 2, - "Description": "Date that the document will expire", - "Id": "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "IsImage": false, - "Key": "2D Expiration Date", - "Name": "Expiration Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataSource": 2, - "Description": "The person's eye color", - "Id": "9e68c7b1-b0d9-4e07-9b74-62b7abd52e38", - "IsImage": false, - "Key": "2D Eye Color", - "Name": "Eye Color", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "BROWN" - }, - { - "DataSource": 2, - "Description": "The person's first name", - "Id": "635d7d60-e7f2-4860-b8f6-1c56ae664a18", - "IsImage": false, - "Key": "2D First Name", - "Name": "First Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "IsImage": false, - "Key": "2D Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataSource": 2, - "Description": "The person's given name", - "Id": "74962a67-44f9-402b-b750-c984a9b55180", - "IsImage": false, - "Key": "2D Given Name", - "Name": "Given Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 2, - "Description": "The person's height ", - "Id": "e3e13977-2d12-4538-9542-5b2f157f3ab3", - "IsImage": false, - "Key": "2D Height", - "Name": "Height", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "5' 7\"" - }, - { - "DataSource": 2, - "Description": "Date that the document was issued", - "Id": "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "IsImage": false, - "Key": "2D Issue Date", - "Name": "Issue Date", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataSource": 2, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "0783e234-96cc-46b4-bc82-c2aaa4b9f7d7", - "IsImage": false, - "Key": "2D Issuing State Code", - "Name": "Issuing State Code", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "ND" - }, - { - "DataSource": 2, - "Description": "Full name of the state or country that issued the document", - "Id": "39f0f97c-0dd1-4c22-b0b9-2320f7f76e95", - "IsImage": false, - "Key": "2D Issuing State Name", - "Name": "Issuing State Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "NORTH DAKOTA" - }, - { - "DataSource": 2, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "d1b20071-682b-46fd-9fa3-6d15e1585300", - "IsImage": false, - "Key": "2D Sex", - "Name": "Sex", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "F" - }, - { - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "5f02ed1f-2768-496c-b39b-7984201c85e4", - "IsImage": false, - "Key": "2D Surname", - "Name": "Surname", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.98, - "Type": "string", - "Value": "DOE" - }, - { - "DataSource": 2, - "Description": "Raw data extracted from the 2D barcode of the document", - "Id": "dfc52064-ab36-46e1-ba01-32d9d4e53ba4", - "IsImage": false, - "Key": "Data_2DBarcode", - "Name": "2D Barcode Data", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "08940735-c61c-45e3-b0a1-438151b0f9f9", - "Reliability": 0.99, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Data?type=Barcode2D" - }, - { - "DataSource": 6, - "Description": "The person's legal, residence, or mailing address", - "Id": "0e793dce-87d3-41c5-a111-c6c31c403439", - "IsImage": false, - "Key": "VIZ Address", - "Name": "Address", - "RegionOfInterest": { - "height": 88, - "width": 503, - "x": 14, - "y": 4 - }, - "RegionReference": "0b27a062-d7b1-42a6-be51-17c225958efd", - "Reliability": 0.4422222375869751, - "Type": "string", - "Value": "1000 E AVENUESBISMARCK ND 58501" - }, - { - "DataSource": 6, - "Description": "The person's date of birth", - "Id": "c66ef71d-0eee-456b-a5c4-935a193287f8", - "IsImage": false, - "Key": "VIZ Birth Date", - "Name": "Birth Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 3, - "y": 5 - }, - "RegionReference": "3b61ac0c-24ad-41fd-bd8d-380f4b803f5e", - "Reliability": 0.5327273011207581, - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataSource": 6, - "Description": "A number that identifies a document", - "Id": "b799881f-7af8-4397-8b5b-953abc9b3677", - "IsImage": false, - "Key": "VIZ Document Number", - "Name": "Document Number", - "RegionOfInterest": { - "height": 61, - "width": 497, - "x": 19, - "y": 21 - }, - "RegionReference": "8b14ac1b-736b-4dd8-a132-f3a61cd526e2", - "Reliability": 0.7241666913032532, - "Type": "string", - "Value": "D0E-84-1165" - }, - { - "DataSource": 6, - "Description": "Date that the document will expire", - "Id": "fdeb031a-4a54-4261-9784-9de902cea941", - "IsImage": false, - "Key": "VIZ Expiration Date", - "Name": "Expiration Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 4, - "y": 6 - }, - "RegionReference": "f42e724e-a8be-4362-a3a2-ab3be86ec0fd", - "Reliability": 0.7127272486686707, - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataSource": 6, - "Description": "The person's eye color", - "Id": "b397bd37-fcb0-4dd6-9a1f-669c8a7f8c86", - "IsImage": false, - "Key": "VIZ Eye Color", - "Name": "Eye Color", - "RegionOfInterest": { - "height": 42, - "width": 122, - "x": 14, - "y": 18 - }, - "RegionReference": "7681e29d-a1cb-491f-9094-2227cef980f1", - "Reliability": 0.45499998331069946, - "Type": "string", - "Value": "BRO" - }, - { - "DataSource": 6, - "Description": "The person's full name (given name plus surname)", - "Id": "b57ec4fb-9002-4196-a1f5-82ef1afc4113", - "IsImage": false, - "Key": "VIZ Full Name", - "Name": "Full Name", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Reliability": 0.45399999618530273, - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataSource": 6, - "Description": "The person's given name", - "Id": "545cec08-745b-45b5-9d61-bf4ea81a9c06", - "IsImage": false, - "Key": "VIZ Given Name", - "Name": "Given Name", - "RegionOfInterest": { - "height": 47, - "width": 169, - "x": 14, - "y": 19 - }, - "RegionReference": "6b3fa1cb-cc5a-4472-9e03-ba8a88480b45", - "Reliability": 0.45399999618530273, - "Type": "string", - "Value": "JANE" - }, - { - "DataSource": 6, - "Description": "The person's height ", - "Id": "40656c40-063d-47ed-845b-6c4b0c4d968a", - "IsImage": false, - "Key": "VIZ Height", - "Name": "Height", - "RegionOfInterest": { - "height": 44, - "width": 155, - "x": 34, - "y": 23 - }, - "RegionReference": "7849bc90-c54d-4db8-bf0b-652e8fa7986c", - "Reliability": 0.38499999046325684, - "Type": "string", - "Value": "5'-07''" - }, - { - "DataSource": 6, - "Description": "Date that the document was issued", - "Id": "a85ab0b5-e33d-4cfc-9084-6513108a1036", - "IsImage": false, - "Key": "VIZ Issue Date", - "Name": "Issue Date", - "RegionOfInterest": { - "height": 19, - "width": 122, - "x": 4, - "y": 4 - }, - "RegionReference": "c3c5ff38-6fb3-45a4-92a0-e122e7651e62", - "Reliability": 0.6909090876579285, - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataSource": 6, - "Description": "A person's image", - "Id": "79548f2e-f92a-4700-8164-09fb6253ccfd", - "IsImage": true, - "Key": "VIZ Photo", - "Name": "Photo", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "e5d4c929-cb0d-471d-9148-e44b29ba0fd5", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=VIZ%20Photo" - }, - { - "DataSource": 6, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "193695a9-946d-428d-9d1d-82fa2737414f", - "IsImage": false, - "Key": "VIZ Sex", - "Name": "Sex", - "RegionOfInterest": { - "height": 14, - "width": 11, - "x": 8, - "y": 8 - }, - "RegionReference": "34023311-b4ac-47dc-8948-0616429bee7d", - "Reliability": 0.6700000166893005, - "Type": "string", - "Value": "F" - }, - { - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "3663bf8d-c5be-4c69-bb3d-8db799adee06", - "IsImage": true, - "Key": "VIZ Signature", - "Name": "Signature", - "RegionOfInterest": { - "height": 0, - "width": 0, - "x": 0, - "y": 0 - }, - "RegionReference": "7974e0dd-46cb-47eb-8557-530a235ca1c2", - "Reliability": 0.9, - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=VIZ%20Signature" - }, - { - "DataSource": 6, - "Description": "The person's surname or family name", - "Id": "39fa1c10-7d63-4cb5-a085-bad2f8efb56b", - "IsImage": false, - "Key": "VIZ Surname", - "Name": "Surname", - "RegionOfInterest": { - "height": 61, - "width": 169, - "x": 13, - "y": 11 - }, - "RegionReference": "8a131204-4c8b-4177-a6f0-c69cec29038f", - "Reliability": 0.9049999713897705, - "Type": "string", - "Value": "DOE" - } - ], - "Device": { - "HasContactlessChipReader": false, - "HasMagneticStripeReader": false, - "SerialNumber": "xxxxx", - "Type": { - "Manufacturer": "Login.gov", - "Model": "Doc Auth 1.0", - "SensorType": 3 - } - }, - "EngineVersion": "2.15.1.171", - "Fields": [ - { - "DataFieldReferences": [ - "2116037e-9e9d-4e82-8ad7-d3cedbd63e6e", - "0e793dce-87d3-41c5-a111-c6c31c403439" - ], - "DataSource": 2, - "Description": "The person's legal, residence, or mailing address", - "Id": "3591a27c-d2d7-4500-804d-03a7269ba56b", - "IsImage": false, - "Key": "Address", - "Name": "Address", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "1000 E AVENUE E APT E BISMARCK, ND 58501" - }, - { - "DataFieldReferences": [ - "f4beefb6-4355-4658-b9e9-05145af35ab9" - ], - "DataSource": 2, - "Description": "City of the person's legal, residence, or mailing address", - "Id": "eded49f2-1b8e-48aa-ac2f-a00205f09d5a", - "IsImage": false, - "Key": "Address City", - "Name": "Address City", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "BISMARCK" - }, - { - "DataFieldReferences": [ - "36a794d9-a6b4-415f-9245-2a669e939a84" - ], - "DataSource": 2, - "Description": "First address line of the person's legal, residence, or mailing address", - "Id": "c721ba18-8118-414a-8221-940bf60c71e2", - "IsImage": false, - "Key": "Address Line 1", - "Name": "Address Line 1", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "1000 E AVENUE E" - }, - { - "DataFieldReferences": [ - "645d1c0a-eac9-4d21-a308-430205a7a49a" - ], - "DataSource": 2, - "Description": "Second address line of the person's legal, residence, or mailing address", - "Id": "f541c1cc-9f98-4131-a92b-0049b6126acd", - "IsImage": false, - "Key": "Address Line 2", - "Name": "Address Line 2", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "APT E" - }, - { - "DataFieldReferences": [ - "208d17a8-6056-4ccf-b89d-b904c27e50c1" - ], - "DataSource": 2, - "Description": "Postal code of the person's address", - "Id": "d8448c25-89c8-46c0-84b3-a350e8473540", - "IsImage": false, - "Key": "Address Postal Code", - "Name": "Address Postal Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "58501" - }, - { - "DataFieldReferences": [ - "7aea3bca-a2c0-482f-9e1b-5a4037a7e326" - ], - "DataSource": 2, - "Description": "State of the person's legal, residence, or mailing address", - "Id": "9eb9bcff-a742-4ac8-a5ce-35db18b1df63", - "IsImage": false, - "Key": "Address State", - "Name": "Address State", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "ND" - }, - { - "DataFieldReferences": [ - "0b7bda63-8cb6-4f7c-bca2-bcee8d90c9ba", - "c66ef71d-0eee-456b-a5c4-935a193287f8" - ], - "DataSource": 2, - "Description": "The person's date of birth", - "Id": "1c36b00c-d0d6-4d70-b5c2-0b1d71b09c30", - "IsImage": false, - "Key": "Birth Date", - "Name": "Birth Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(449625600000)/" - }, - { - "DataFieldReferences": [ - "2151bee6-4688-4b6b-bb83-08cf2ee5be2a" - ], - "DataSource": 2, - "Description": "A 16-digit document discriminator code that uniquely identifies where and when a U.S. or Canadian ID was issued", - "Id": "96b2f01b-19df-46e6-8682-268462976c2a", - "IsImage": false, - "Key": "DD Number", - "Name": "DD Number", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "8DOE841165DJ52224JE67NYZ" - }, - { - "DataFieldReferences": [], - "DataSource": 7, - "Description": "The localized version of the document class of the document type", - "Id": "8142c01b-cf85-47da-9f3e-dc97c24f1758", - "IsImage": false, - "Key": "Document Class Name", - "Name": "Document Class Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "Identification Card" - }, - { - "DataFieldReferences": [ - "4c2fd852-4026-4118-8cda-f581173472bf", - "b799881f-7af8-4397-8b5b-953abc9b3677" - ], - "DataSource": 2, - "Description": "A number that identifies a document", - "Id": "ee3140d8-6334-4608-ad17-a7bf42a7ddf5", - "IsImage": false, - "Key": "Document Number", - "Name": "Document Number", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "DOE-84-1165" - }, - { - "DataFieldReferences": [ - "ea83593a-a4f3-4f45-8a7f-5284fda1cf00", - "fdeb031a-4a54-4261-9784-9de902cea941" - ], - "DataSource": 2, - "Description": "Date that the document will expire", - "Id": "f2b99962-ba02-47a5-afb1-398b5c413499", - "IsImage": false, - "Key": "Expiration Date", - "Name": "Expiration Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1666569600000)/" - }, - { - "DataFieldReferences": [ - "9e68c7b1-b0d9-4e07-9b74-62b7abd52e38", - "b397bd37-fcb0-4dd6-9a1f-669c8a7f8c86" - ], - "DataSource": 2, - "Description": "The person's eye color", - "Id": "1b6cc8ec-7754-4fc4-99d3-f0a1d861501c", - "IsImage": false, - "Key": "Eye Color", - "Name": "Eye Color", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "BROWN" - }, - { - "DataFieldReferences": [ - "635d7d60-e7f2-4860-b8f6-1c56ae664a18" - ], - "DataSource": 2, - "Description": "The person's first name", - "Id": "0e664710-decb-44d5-a638-0b9396f57bdf", - "IsImage": false, - "Key": "First Name", - "Name": "First Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE" - }, - { - "DataFieldReferences": [ - "536f7296-64b2-48fa-a52b-2a6b01cb6d39", - "b57ec4fb-9002-4196-a1f5-82ef1afc4113" - ], - "DataSource": 2, - "Description": "The person's full name (given name plus surname)", - "Id": "e575acd5-a304-4828-8b6e-38b4f928c1ae", - "IsImage": false, - "Key": "Full Name", - "Name": "Full Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE DOE" - }, - { - "DataFieldReferences": [ - "74962a67-44f9-402b-b750-c984a9b55180", - "545cec08-745b-45b5-9d61-bf4ea81a9c06" - ], - "DataSource": 2, - "Description": "The person's given name", - "Id": "b0c71cc8-47d8-47f1-bc54-509e558e8b92", - "IsImage": false, - "Key": "Given Name", - "Name": "Given Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "JANE" - }, - { - "DataFieldReferences": [ - "e3e13977-2d12-4538-9542-5b2f157f3ab3", - "40656c40-063d-47ed-845b-6c4b0c4d968a" - ], - "DataSource": 2, - "Description": "The person's height ", - "Id": "7d25c868-2d67-4148-b193-8c6d312594aa", - "IsImage": false, - "Key": "Height", - "Name": "Height", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "5' 7\"" - }, - { - "DataFieldReferences": [ - "add7cebc-f175-4494-9dbd-8cd48d908ee5", - "a85ab0b5-e33d-4cfc-9084-6513108a1036" - ], - "DataSource": 2, - "Description": "Date that the document was issued", - "Id": "cf88e817-c6e9-464f-8d8b-c5bf0e4d742d", - "IsImage": false, - "Key": "Issue Date", - "Name": "Issue Date", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "datetime", - "Value": "/Date(1414108800000)/" - }, - { - "DataFieldReferences": [ - "0783e234-96cc-46b4-bc82-c2aaa4b9f7d7" - ], - "DataSource": 7, - "Description": "Abbreviated ID code of the state or country that issued the document", - "Id": "9cb81d4f-1eae-4104-b1e1-43efc6b8d9b9", - "IsImage": false, - "Key": "Issuing State Code", - "Name": "Issuing State Code", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "ND" - }, - { - "DataFieldReferences": [ - "39f0f97c-0dd1-4c22-b0b9-2320f7f76e95" - ], - "DataSource": 7, - "Description": "Full name of the state or country that issued the document", - "Id": "c22f6f70-4bec-4b16-a604-d65fc155f845", - "IsImage": false, - "Key": "Issuing State Name", - "Name": "Issuing State Name", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "North Dakota" - }, - { - "DataFieldReferences": [ - "79548f2e-f92a-4700-8164-09fb6253ccfd" - ], - "DataSource": 6, - "Description": "A person's image", - "Id": "bcf8dd88-1859-40e0-977a-567796167ec9", - "IsImage": true, - "Key": "Photo", - "Name": "Photo", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Photo" - }, - { - "DataFieldReferences": [ - "d1b20071-682b-46fd-9fa3-6d15e1585300", - "193695a9-946d-428d-9d1d-82fa2737414f" - ], - "DataSource": 2, - "Description": "A single character (translated into M/F from other languages) that identifies the person's gender", - "Id": "11297afa-e41e-45ae-85af-aef0499be70d", - "IsImage": false, - "Key": "Sex", - "Name": "Sex", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "F" - }, - { - "DataFieldReferences": [ - "3663bf8d-c5be-4c69-bb3d-8db799adee06" - ], - "DataSource": 6, - "Description": "An image of the person's signature", - "Id": "4eea0344-2a27-4945-a803-68cb94966dac", - "IsImage": true, - "Key": "Signature", - "Name": "Signature", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "uri", - "Value": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Field/Image?key=Signature" - }, - { - "DataFieldReferences": [ - "5f02ed1f-2768-496c-b39b-7984201c85e4", - "39fa1c10-7d63-4cb5-a085-bad2f8efb56b" - ], - "DataSource": 2, - "Description": "The person's surname or family name", - "Id": "954993cb-49df-4626-a817-bbbc372d36d7", - "IsImage": false, - "Key": "Surname", - "Name": "Surname", - "RegionReference": "00000000-0000-0000-0000-000000000000", - "Type": "string", - "Value": "DOE" - } - ], - "Images": [ - { - "GlareMetric": null, - "HorizontalResolution": 600, - "Id": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "IsCropped": true, - "IsTampered": false, - "Light": 0, - "MimeType": "image/vnd.ms-photo", - "SharpnessMetric": null, - "Side": 0, - "Uri": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Image?side=Front&light=White", - "VerticalResolution": 600 - }, - { - "GlareMetric": null, - "HorizontalResolution": 600, - "Id": "6954e69a-e35f-473f-9579-e1da226a8721", - "IsCropped": true, - "IsTampered": false, - "Light": 0, - "MimeType": "image/vnd.ms-photo", - "SharpnessMetric": null, - "Side": 1, - "Uri": "https://services.assureid.net/AssureIDService/Document/7748c634-a2ab-4f3a-a901-39084ada8093/Image?side=Back&light=White", - "VerticalResolution": 600 - } - ], - "InstanceId": "7748c634-a2ab-4f3a-a901-39084ada8093", - "LibraryVersion": "20.05.07.182", - "ProcessMode": 2, - "Regions": [ - { - "DocumentElement": 3, - "Id": "cc56bfc3-f838-4e90-aba8-61cecc6092e5", - "ImageReference": "6954e69a-e35f-473f-9579-e1da226a8721", - "Key": "1D Barcode", - "Rectangle": { - "height": 889, - "width": 183, - "x": 0, - "y": 205 - } - }, - { - "DocumentElement": 3, - "Id": "08940735-c61c-45e3-b0a1-438151b0f9f9", - "ImageReference": "6954e69a-e35f-473f-9579-e1da226a8721", - "Key": "2D Barcode", - "Rectangle": { - "height": 524, - "width": 1794, - "x": 219, - "y": 24 - } - }, - { - "DocumentElement": 3, - "Id": "0b27a062-d7b1-42a6-be51-17c225958efd", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Address", - "Rectangle": { - "height": 168, - "width": 1260, - "x": 732, - "y": 580 - } - }, - { - "DocumentElement": 3, - "Id": "3b61ac0c-24ad-41fd-bd8d-380f4b803f5e", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Birth Date", - "Rectangle": { - "height": 97, - "width": 427, - "x": 872, - "y": 847 - } - }, - { - "DocumentElement": 4, - "Id": "dfeb1e30-d410-402b-b3d7-dbe2d0f70e53", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Date Font", - "Rectangle": { - "height": 285, - "width": 449, - "x": 846, - "y": 840 - } - }, - { - "DocumentElement": 3, - "Id": "8b14ac1b-736b-4dd8-a132-f3a61cd526e2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Document Number", - "Rectangle": { - "height": 114, - "width": 719, - "x": 872, - "y": 736 - } - }, - { - "DocumentElement": 4, - "Id": "2731d8b0-f42e-43ab-b668-2e784ae6dbf7", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Document Type", - "Rectangle": { - "height": 183, - "width": 675, - "x": 1085, - "y": 97 - } - }, - { - "DocumentElement": 3, - "Id": "f42e724e-a8be-4362-a3a2-ab3be86ec0fd", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Expiration Date", - "Rectangle": { - "height": 93, - "width": 433, - "x": 870, - "y": 1014 - } - }, - { - "DocumentElement": 4, - "Id": "216177ee-7232-49f2-9608-b991f4c1b255", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Expiration Date Label", - "Rectangle": { - "height": 134, - "width": 223, - "x": 689, - "y": 997 - } - }, - { - "DocumentElement": 3, - "Id": "7681e29d-a1cb-491f-9094-2227cef980f1", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Eye Color", - "Rectangle": { - "height": 71, - "width": 179, - "x": 1512, - "y": 1028 - } - }, - { - "DocumentElement": 4, - "Id": "b684bbda-bed3-4ffa-9dd9-99d9711830ea", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Eyes Label Pattern", - "Rectangle": { - "height": 107, - "width": 273, - "x": 1301, - "y": 1009 - } - }, - { - "DocumentElement": 5, - "Id": "11eeb3c3-8c92-4c91-bdb1-28cf2631f278", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Flag Pattern", - "Rectangle": { - "height": 275, - "width": 391, - "x": 2, - "y": 2 - } - }, - { - "DocumentElement": 3, - "Id": "6b3fa1cb-cc5a-4472-9e03-ba8a88480b45", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Given Name", - "Rectangle": { - "height": 84, - "width": 1258, - "x": 732, - "y": 502 - } - }, - { - "DocumentElement": 4, - "Id": "cfc9ae0a-cab8-4d55-a5ac-10f291410152", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Header", - "Rectangle": { - "height": 292, - "width": 871, - "x": 278, - "y": 8 - } - }, - { - "DocumentElement": 4, - "Id": "44cb9c08-71d1-4ba6-ab11-9707f39da5a2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Header Left", - "Rectangle": { - "height": 332, - "width": 324, - "x": 280, - "y": 2 - } - }, - { - "DocumentElement": 3, - "Id": "7849bc90-c54d-4db8-bf0b-652e8fa7986c", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Height", - "Rectangle": { - "height": 78, - "width": 219, - "x": 1490, - "y": 938 - } - }, - { - "DocumentElement": 4, - "Id": "c6a2c733-3ee7-47d9-aff6-6f158731a3a2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Height Font", - "Rectangle": { - "height": 85, - "width": 202, - "x": 1501, - "y": 942 - } - }, - { - "DocumentElement": 4, - "Id": "51bf3805-653c-4445-859f-2b96e28aeb0a", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Horses", - "Rectangle": { - "height": 189, - "width": 448, - "x": 1279, - "y": 248 - } - }, - { - "DocumentElement": 3, - "Id": "c3c5ff38-6fb3-45a4-92a0-e122e7651e62", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Issue Date", - "Rectangle": { - "height": 82, - "width": 433, - "x": 870, - "y": 936 - } - }, - { - "DocumentElement": 4, - "Id": "857ba82f-98e7-4465-8999-2502df10c3b9", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Lower Data Labels", - "Rectangle": { - "height": 538, - "width": 240, - "x": 646, - "y": 732 - } - }, - { - "DocumentElement": 4, - "Id": "afbf1d5a-b510-4ca3-8f94-9e302d5f9dbc", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Lower Data Labels Right", - "Rectangle": { - "height": 298, - "width": 159, - "x": 1282, - "y": 844 - } - }, - { - "DocumentElement": 4, - "Id": "bdab7938-b938-4248-b881-ff01f4f18f10", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Microprint", - "Rectangle": { - "height": 88, - "width": 631, - "x": 1199, - "y": 57 - } - }, - { - "DocumentElement": 2, - "Id": "e5d4c929-cb0d-471d-9148-e44b29ba0fd5", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Photo", - "Rectangle": { - "height": 822, - "width": 614, - "x": 78, - "y": 246 - } - }, - { - "DocumentElement": 3, - "Id": "34023311-b4ac-47dc-8948-0616429bee7d", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Sex", - "Rectangle": { - "height": 86, - "width": 81, - "x": 1499, - "y": 854 - } - }, - { - "DocumentElement": 2, - "Id": "7974e0dd-46cb-47eb-8557-530a235ca1c2", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Signature", - "Rectangle": { - "height": 170, - "width": 610, - "x": 75, - "y": 1056 - } - }, - { - "DocumentElement": 3, - "Id": "8a131204-4c8b-4177-a6f0-c69cec29038f", - "ImageReference": "491cc3c0-a821-46bd-8fb7-2e697fd9fb29", - "Key": "Surname", - "Rectangle": { - "height": 88, - "width": 1258, - "x": 734, - "y": 429 - } - } - ], - "Result": 1, - "Subscription": { - "DocumentProcessMode": 2, - "Id": "fake-subscription-id", - "IsActive": true, - "IsDevelopment": true, - "IsTrial": false, - "Name": "Dev GSA iProov", - "StorePII": false - }, - "TamperResult": 1, - "TamperSensitivity": 0 -} diff --git a/spec/services/doc_auth/acuant/acuant_client_spec.rb b/spec/services/doc_auth/acuant/acuant_client_spec.rb deleted file mode 100644 index ab68738fce2..00000000000 --- a/spec/services/doc_auth/acuant/acuant_client_spec.rb +++ /dev/null @@ -1,266 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::AcuantClient do - let(:assure_id_url) { 'https://acuant.assure.example.com' } - let(:facial_match_url) { 'https://acuant.facial.example.com' } - let(:passlive_url) { 'https://acuant.passlive.example.com' } - let(:image_source) { DocAuth::ImageSources::ACUANT_SDK } - - subject(:client) do - DocAuth::Acuant::AcuantClient.new( - assure_id_url: assure_id_url, - facial_match_url: facial_match_url, - passlive_url: passlive_url, - ) - end - - describe '#create_document' do - it 'sends a create document request with cropping mode' do - url = URI.join(assure_id_url, '/AssureIDService/Document/Instance') - stub_request(:post, url). - with(body: hash_including(ImageCroppingMode: DocAuth::Acuant::CroppingModes::NONE)). - to_return(body: AcuantFixtures.create_document_response) - - result = subject.create_document(image_source: image_source) - - expect(result.success?).to eq(true) - expect(result.instance_id).to eq('this-is-a-test-instance-id') # instance ID from fixture - end - - context 'invalid cropping mode' do - let(:image_source) { 'invalid' } - - it 'raises an error' do - message = 'unknown image_source=invalid' - expect { subject.create_document(image_source: image_source) }.to raise_error(message) - end - end - end - - describe '#post_front_image' do - it 'sends an upload image request for the front image' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join( - assure_id_url, "/AssureIDService/Document/#{instance_id}/Image" - ) - stub_request(:post, url).with(query: { side: 0, light: 0 }).to_return(body: '', status: 201) - - result = subject.post_front_image( - instance_id: instance_id, - image: DocAuthImageFixtures.document_front_image, - ) - - expect(result.success?).to eq(true) - end - end - - describe '#post_back_image' do - it 'sends an upload image request for the back image' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join( - assure_id_url, "/AssureIDService/Document/#{instance_id}/Image" - ) - stub_request(:post, url).with(query: { side: 1, light: 0 }).to_return(body: '', status: 201) - - result = subject.post_back_image( - instance_id: instance_id, - image: DocAuthImageFixtures.document_back_image, - ) - - expect(result.success?).to eq(true) - end - end - - describe '#post_images' do - let(:instance_id) { 'this-is-a-test-instance-id' } - let(:image_upload_url) do - URI.join( - assure_id_url, "/AssureIDService/Document/#{instance_id}/Image" - ) - end - let(:front_image_query) { { query: { side: 0, light: 0 } } } - let(:back_image_query) { { query: { side: 1, light: 0 } } } - let(:results_url) do - URI.join( - assure_id_url, "/AssureIDService/Document/#{instance_id}" - ) - end - - before do - # DL image upload stubs - stub_request(:post, image_upload_url).with(front_image_query).to_return(body: '', status: 201) - stub_request(:post, image_upload_url).with(back_image_query).to_return(body: '', status: 201) - stub_request(:get, results_url).to_return(body: AcuantFixtures.get_results_response_success) - - allow(subject).to receive(:create_document).and_return( - OpenStruct.new('success?' => true, instance_id: instance_id), - ) - end - - context 'when results pass' do - it 'sends an upload image request for the front and back DL images' do - result = subject.post_images( - front_image: DocAuthImageFixtures.document_front_image, - back_image: DocAuthImageFixtures.document_back_image, - image_source: image_source, - ) - - extra_expected_hash = { - processed_alerts: a_hash_including(:failed, :passed), - alert_failure_count: 2, - image_metrics: a_hash_including(:back, :front), - } - - expect(result.success?).to eq(true) - expect(result.class).to eq(DocAuth::Acuant::Responses::GetResultsResponse) - expect(result.extra).to include(extra_expected_hash) - end - end - - context 'when the results return failure' do - it 'returns a FormResponse with failure' do - url = URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - stub_request(:get, url).to_return(body: AcuantFixtures.get_results_response_failure) - - result = subject.post_images( - front_image: DocAuthImageFixtures.document_front_image, - back_image: DocAuthImageFixtures.document_back_image, - image_source: image_source, - ) - - expect(result.success?).to eq(false) - end - end - end - - describe '#get_results' do - context 'when the result is a pass' do - it 'sends a request to get the results and returns success' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - stub_request(:get, url).to_return(body: AcuantFixtures.get_results_response_success) - - result = subject.get_results(instance_id: instance_id) - - expect(result.success?).to eq(true) - end - it 'notes that address line 2 was present' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - stub_request(:get, url).to_return(body: AcuantFixtures.get_results_response_success) - - result = subject.get_results(instance_id: instance_id) - - expect(result.extra).to include(address_line2_present: true) - end - - context 'when there is no address line 2' do - it 'notes that address line 2 was not present' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - body = JSON.parse(AcuantFixtures.get_results_response_success).tap do |json| - json['Fields'] = json['Fields'].select { |f| f['Name'] != 'Address Line 2' } - end.to_json - stub_request(:get, url).to_return(body: body) - - result = subject.get_results(instance_id: instance_id) - - expect(result.extra).to include(address_line2_present: false) - end - end - end - - context 'when the result is a failure' do - it 'sends a request to get the results and returns failure' do - instance_id = 'this-is-a-test-instance-id' - url = URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - stub_request(:get, url).to_return(body: AcuantFixtures.get_results_response_failure) - - result = subject.get_results(instance_id: instance_id) - - expect(result.success?).to eq(false) - end - end - end - - context 'when the request is not successful' do - it 'returns a response with an exception' do - url = URI.join(assure_id_url, '/AssureIDService/Document/Instance') - stub_request(:post, url).to_return(body: '', status: 500) - - expect(NewRelic::Agent).to receive(:notice_error) - - result = subject.create_document(image_source: image_source) - - expect(result.success?).to eq(false) - expect(result.errors).to eq(network: true) - expect(result.exception.message).to eq( - 'DocAuth::Acuant::Requests::CreateDocumentRequest Unexpected HTTP response 500', - ) - end - end - - context 'when there is a networking error' do - it 'returns a response with an exception' do - url = URI.join(assure_id_url, '/AssureIDService/Document/Instance') - stub_request(:post, url).to_raise(Faraday::TimeoutError.new('Connection failed')) - - expect(NewRelic::Agent).to receive(:notice_error) - - result = subject.create_document(image_source: image_source) - - expect(result.success?).to eq(false) - expect(result.errors).to eq(network: true) - expect(result.exception.message).to eq( - 'Connection failed', - ) - end - end - - context 'when there is expected rxx http status code' do - shared_examples 'with http status' do |status| - it "generate response for status #{status} " do - instance_id = 'this-is-a-test-instance-id' - url = URI.join( - assure_id_url, "/AssureIDService/Document/#{instance_id}/Image" - ) - stub_request(:post, url).with(query: { side: 0, light: 0 }).to_return( - body: '', - status: status, - ) - - result = subject.post_front_image( - instance_id: instance_id, - image: DocAuthImageFixtures.document_front_image, - ) - expect(result.exception.message).not_to be_nil - case status - when 440 - expect(result.errors).to eql( - { - general: [DocAuth::Errors::IMAGE_SIZE_FAILURE], - front: [DocAuth::Errors::IMAGE_SIZE_FAILURE_FIELD], - }, - ) - when 438 - expect(result.errors).to eql( - { - general: [DocAuth::Errors::IMAGE_LOAD_FAILURE], - front: [DocAuth::Errors::IMAGE_LOAD_FAILURE_FIELD], - }, - ) - when 439 - expect(result.errors).to eql( - { - general: [DocAuth::Errors::PIXEL_DEPTH_FAILURE], - front: [DocAuth::Errors::PIXEL_DEPTH_FAILURE_FIELD], - }, - ) - end - end - end - it_should_behave_like 'with http status', 440 - it_should_behave_like 'with http status', 439 - it_should_behave_like 'with http status', 438 - end -end diff --git a/spec/services/doc_auth/acuant/issuer_types_spec.rb b/spec/services/doc_auth/acuant/issuer_types_spec.rb deleted file mode 100644 index 163c90946e1..00000000000 --- a/spec/services/doc_auth/acuant/issuer_types_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::IssuerTypes do - describe '.from_int' do - it 'is a result code for the int' do - issuer_type = DocAuth::Acuant::IssuerTypes.from_int(1) - expect(issuer_type).to be_a(DocAuth::Acuant::IssuerTypes::IssuerType) - end - - it 'is nil when there is no matching code' do - issuer_type = DocAuth::Acuant::IssuerTypes.from_int(999) - expect(issuer_type).to be_nil - end - end -end diff --git a/spec/services/doc_auth/acuant/pii_from_doc_spec.rb b/spec/services/doc_auth/acuant/pii_from_doc_spec.rb deleted file mode 100644 index 92780fe2004..00000000000 --- a/spec/services/doc_auth/acuant/pii_from_doc_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::PiiFromDoc do - subject(:pii_from_doc) { described_class.new(response_body) } - let(:response_body) { JSON.parse(AcuantFixtures.get_results_response_success) } - - describe '#call' do - it 'correctly parses the pii data from acuant and returns a hash' do - results = pii_from_doc.call - expect(results).to eq( - first_name: 'JANE', - middle_name: nil, - last_name: 'DOE', - address1: '1000 E AVENUE E', - address2: 'APT E', - city: 'BISMARCK', - state: 'ND', - zipcode: '58501', - dob: '1984-04-01', - state_id_expiration: '2022-10-24', - state_id_issued: '2014-10-24', - state_id_number: 'DOE-84-1165', - state_id_jurisdiction: 'ND', - state_id_type: 'state_id_card', - ) - end - end - - describe '#convert_date' do - it 'parses and formats a date from the Acuant format' do - expect(pii_from_doc.convert_date('/Date(449625600000)/')).to eq('1984-04-01') - end - - it 'parses and formats negative numbers' do - expect(pii_from_doc.convert_date('/Date(-985824000000)/')).to eq('1938-10-06') - end - - it 'is nil for a bad format' do - expect(pii_from_doc.convert_date('/Foobar(111111)/')).to eq(nil) - end - end -end diff --git a/spec/services/doc_auth/acuant/request_spec.rb b/spec/services/doc_auth/acuant/request_spec.rb deleted file mode 100644 index c8ced684564..00000000000 --- a/spec/services/doc_auth/acuant/request_spec.rb +++ /dev/null @@ -1,223 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Request do - let(:simple_acuant_request) do - Class.new(DocAuth::Acuant::Request) do - def handle_http_response(http_response) - http_response.body.upcase! - http_response - end - end - end - - let(:assure_id_url) { 'https://acuant.assureid.example.com' } - let(:assure_id_username) { 'acuant.username' } - let(:assure_id_password) { 'acuant.password' } - - let(:path) { '/test/path' } - let(:full_url) { URI.join(assure_id_url, path) } - let(:metric_name) { 'acuant' } - let(:request_body) { 'test request body' } - let(:request_headers) do - username = assure_id_username - password = assure_id_password - { - 'Authorization' => [ - 'Basic', - Base64.strict_encode64("#{username}:#{password}"), - ].join(' '), - 'Accept' => 'application/json', - } - end - let(:request_method) { :get } - - let(:config) do - DocAuth::Acuant::Config.new( - assure_id_url: assure_id_url, - assure_id_username: assure_id_username, - assure_id_password: assure_id_password, - ) - end - - subject do - request = simple_acuant_request.new(config: config) - allow(request).to receive(:path).and_return(path) - allow(request).to receive(:body).and_return(request_body) - allow(request).to receive(:method).and_return(request_method) - allow(request).to receive(:metric_name).and_return(metric_name) - request - end - - describe '#fetch' do - context 'when the request resolves with a 200' do - it 'calls handle_http_response on the subclass' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 200) - - response = subject.fetch - - expect(response.body).to eq('TEST RESPONSE BODY') - end - end - - context 'when the request is a post instead of a get' do - let(:request_method) { :post } - - it 'sends a post request with a request body' do - stub_request(:post, full_url). - with(headers: request_headers, body: request_body). - to_return(body: 'test response body', status: 200) - - response = subject.fetch - - expect(response.body).to eq('TEST RESPONSE BODY') - end - end - - context 'when the request resolves with a non 200 status' do - it 'returns a response with an exception' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 404) - allow(NewRelic::Agent).to receive(:notice_error) - - response = subject.fetch - - expect(response.success?).to eq(false) - expect(response.errors).to eq(network: true) - expect(response.exception.message).to include('Unexpected HTTP response 404') - end - - it 'returns a response of status 440 with an exception' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 440) - allow(NewRelic::Agent).to receive(:notice_error) - - response = subject.fetch - - expect(response.success?).to eq(false) - expect(response.errors).to have_key(:general) - expect(response.exception.message).to include('Unexpected HTTP response 440') - end - - it 'returns a response of status 500 with an exception' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 500) - allow(NewRelic::Agent).to receive(:notice_error) - - response = subject.fetch - - expect(response.success?).to eq(false) - expect(response.errors).to have_key(:network) - expect(response.exception.message).to include('Unexpected HTTP response 500') - end - end - - context 'when the request resolves with retriable error then succeeds it only retries once' do - it 'calls NewRelic::Agent.notice_error each retry' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return( - { body: 'test response body', status: 404 }, - { body: 'test response body', status: 200 }, - ) - - expect(NewRelic::Agent).to receive(:notice_error). - with(anything, { custom_params: hash_including(:retry) }).once - - response = subject.fetch - - expect(response.success?).to eq(true) - end - end - - context 'when the request resolves with a 404 status it retries' do - it 'calls NewRelic::Agent.notice_error each retry' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return( - { body: 'test response body', status: 404 }, - { body: 'test response body', status: 404 }, - ) - - expect(NewRelic::Agent).to receive(:notice_error). - with(DocAuth::RequestError, {}).once - - expect(NewRelic::Agent).to receive(:notice_error). - with(anything, { custom_params: hash_including(:retry) }).twice - - response = subject.fetch - - expect(response.success?).to eq(false) - end - end - - context 'when the request times out' do - it 'returns a response with a timeout message and exception and notifies NewRelic' do - stub_request(:get, full_url).to_timeout - - expect(NewRelic::Agent).to receive(:notice_error) - - response = subject.fetch - - expect(response.success?).to eq(false) - expect(response.errors).to eq(network: true) - expect(response.exception).to be_a(Faraday::ConnectionFailed) - expect(response.extra).to include(vendor: 'Acuant') - end - end - - context 'when the request resolves with a handled http error status' do - def expect_failed_response(response) - expect(response.success?).to eq(false) - expect(response.exception).to be_kind_of(DocAuth::RequestError) - expect(response.exception.message).not_to be_empty - end - - it 'it produces a 438 error' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 438) - - expect(NewRelic::Agent).not_to receive(:notice_error) - - response = subject.fetch - - expect_failed_response(response) - expect(response.errors).to eq(general: [DocAuth::Errors::IMAGE_LOAD_FAILURE]) - expect(response.extra).to include(vendor: 'Acuant') - end - - it 'it produces a 439 error' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 439) - - expect(NewRelic::Agent).not_to receive(:notice_error) - - response = subject.fetch - - expect_failed_response(response) - expect(response.errors).to eq(general: [DocAuth::Errors::PIXEL_DEPTH_FAILURE]) - expect(response.extra).to include(vendor: 'Acuant') - end - - it 'it produces a 440 error' do - stub_request(:get, full_url). - with(headers: request_headers). - to_return(body: 'test response body', status: 440) - - expect(NewRelic::Agent).not_to receive(:notice_error) - - response = subject.fetch - - expect_failed_response(response) - expect(response.errors).to eq(general: [DocAuth::Errors::IMAGE_SIZE_FAILURE]) - expect(response.extra).to include(vendor: 'Acuant') - end - end - end -end diff --git a/spec/services/doc_auth/acuant/requests/create_document_request_spec.rb b/spec/services/doc_auth/acuant/requests/create_document_request_spec.rb deleted file mode 100644 index 333630a30ec..00000000000 --- a/spec/services/doc_auth/acuant/requests/create_document_request_spec.rb +++ /dev/null @@ -1,88 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Requests::CreateDocumentRequest do - describe '#fetch' do - let(:assure_id_url) { 'https://acuant.assureid.example.com' } - let(:assure_id_subscription_id) { '1234567' } - let(:image_source) { DocAuth::ImageSources::UNKNOWN } - let(:cropping_mode) { DocAuth::Acuant::CroppingModes::ALWAYS } - let(:sensor_type) { DocAuth::Acuant::SensorTypes::UNKNOWN } - - let(:url) { URI.join(assure_id_url, '/AssureIDService/Document/Instance') } - let(:request_body) do - { - AuthenticationSensitivity: 0, - ClassificationMode: 0, - Device: { - HasContactlessChipReader: false, - HasMagneticStripeReader: false, - SerialNumber: 'xxxxx', - Type: { - Manufacturer: 'Login.gov', - Model: 'Doc Auth 1.0', - SensorType: sensor_type, - }, - }, - ImageCroppingExpectedSize: '1', - ImageCroppingMode: cropping_mode, - ManualDocumentType: nil, - ProcessMode: 0, - SubscriptionId: assure_id_subscription_id, - }.to_json - end - let(:response_body) do - AcuantFixtures.create_document_response - end - - let(:config) do - DocAuth::Acuant::Config.new( - assure_id_url: assure_id_url, - assure_id_subscription_id: assure_id_subscription_id, - ) - end - - context 'acuant sdk image source' do - let(:image_source) { DocAuth::ImageSources::ACUANT_SDK } - let(:cropping_mode) { DocAuth::Acuant::CroppingModes::NONE } - let(:sensor_type) { DocAuth::Acuant::SensorTypes::MOBILE } - - it 'sends a well formed request and returns a response with the instance ID' do - request_stub = stub_request(:post, url).with( - body: request_body, - ).to_return( - body: response_body, - ) - - response = described_class.new(config: config, image_source: image_source).fetch - - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - expect(response.instance_id).to eq('this-is-a-test-instance-id') # instance ID from fixture - expect(request_stub).to have_been_requested - end - end - - context 'upload image source' do - let(:image_source) { DocAuth::ImageSources::UNKNOWN } - let(:cropping_mode) { DocAuth::Acuant::CroppingModes::ALWAYS } - let(:sensor_type) { DocAuth::Acuant::SensorTypes::UNKNOWN } - - it 'sends a well formed request and returns a response with the instance ID' do - request_stub = stub_request(:post, url).with( - body: request_body, - ).to_return( - body: response_body, - ) - - response = described_class.new(config: config, image_source: image_source).fetch - - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - expect(response.instance_id).to eq('this-is-a-test-instance-id') # instance ID from fixture - expect(request_stub).to have_been_requested - end - end - end -end diff --git a/spec/services/doc_auth/acuant/requests/get_results_request_spec.rb b/spec/services/doc_auth/acuant/requests/get_results_request_spec.rb deleted file mode 100644 index 8865965b7c5..00000000000 --- a/spec/services/doc_auth/acuant/requests/get_results_request_spec.rb +++ /dev/null @@ -1,40 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Requests::GetResultsRequest do - describe '#fetch' do - let(:instance_id) { '123abc' } - let(:url) do - URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}") - end - let(:response_body) { AcuantFixtures.get_results_response_success } - - let(:assure_id_url) { 'https://acuant.assureid.example.com' } - let(:config) { DocAuth::Acuant::Config.new(assure_id_url: assure_id_url) } - - it 'sends a request and return the response' do - request_stub = stub_request(:get, url).to_return(body: response_body) - - response = described_class.new(config: config, instance_id: instance_id).fetch - - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - expect(response.pii_from_doc).to_not be_empty - expect(request_stub).to have_been_requested - end - - it 'get general error for 4xx' do - stub_request(:get, url).to_return(status: 440) - response = described_class.new(config: config, instance_id: instance_id).fetch - expect(response.errors).to include(:general, :front, :back) - expect(response.network_error?).to eq(false) - end - - it 'get network error for 500' do - stub_request(:get, url).to_return(status: 500) - response = described_class.new(config: config, instance_id: instance_id).fetch - expect(response.errors).to have_key(:network) - expect(response.network_error?).to eq(true) - end - end -end diff --git a/spec/services/doc_auth/acuant/requests/upload_image_request_spec.rb b/spec/services/doc_auth/acuant/requests/upload_image_request_spec.rb deleted file mode 100644 index 34cf0438e7d..00000000000 --- a/spec/services/doc_auth/acuant/requests/upload_image_request_spec.rb +++ /dev/null @@ -1,85 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Requests::UploadImageRequest do - let(:instance_id) { '123abc' } - let(:url) do - URI.join(assure_id_url, "/AssureIDService/Document/#{instance_id}/Image") - end - - let(:assure_id_url) { 'https://acuant.assureid.example.com' } - let(:config) { DocAuth::Acuant::Config.new(assure_id_url: assure_id_url) } - - context 'with a front image' do - it 'uploads the image and returns a successful result' do - request_stub = stub_request(:post, url).with( - query: { side: 0, light: 0 }, - body: DocAuthImageFixtures.document_front_image, - ).to_return(body: '', status: 201) - - request = described_class.new( - config: config, - image_data: DocAuthImageFixtures.document_front_image, - instance_id: instance_id, - side: :front, - ) - response = request.fetch - - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - expect(request_stub).to have_been_requested - end - - context 'when http status is 4xx' do - shared_examples 'http expected 4xx status' do |http_status, general_failure, side_failure| - it "generate errors for #{http_status}" do - request_stub = stub_request(:post, url).with( - query: { side: 0, light: 0 }, - body: DocAuthImageFixtures.document_front_image, - ).to_return(body: '', status: http_status) - - request = described_class.new( - config: config, - image_data: DocAuthImageFixtures.document_front_image, - instance_id: instance_id, - side: :front, - ) - response = request.fetch - expect(response.success?).to eq(false) - expect(response.errors).to eq({ front: [side_failure], general: [general_failure] }) - expect(response.exception).not_to be_nil - expect(request_stub).to have_been_requested - end - end - - it_should_behave_like 'http expected 4xx status', 440, 'image_size_failure', - 'image_size_failure_field' - it_should_behave_like 'http expected 4xx status', 438, 'image_load_failure', - 'image_load_failure_field' - it_should_behave_like 'http expected 4xx status', 439, 'pixel_depth_failure', - 'pixel_depth_failure_field' - end - end - - context 'with a back image' do - it 'uploads the image and returns a successful result' do - request_stub = stub_request(:post, url).with( - query: { side: 1, light: 0 }, - body: DocAuthImageFixtures.document_back_image, - ).to_return(body: '', status: 201) - - request = described_class.new( - config: config, - image_data: DocAuthImageFixtures.document_back_image, - instance_id: instance_id, - side: :back, - ) - response = request.fetch - - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - expect(request_stub).to have_been_requested - end - end -end diff --git a/spec/services/doc_auth/acuant/responses/create_document_response_spec.rb b/spec/services/doc_auth/acuant/responses/create_document_response_spec.rb deleted file mode 100644 index 326eac61ee3..00000000000 --- a/spec/services/doc_auth/acuant/responses/create_document_response_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Responses::CreateDocumentResponse do - it 'contains the instance_id from the response' do - http_response = instance_double( - Faraday::Response, - body: AcuantFixtures.create_document_response, - ) - - response = described_class.new(http_response) - - expect(response.success?).to eq(true) - expect(response.instance_id).to eq('this-is-a-test-instance-id') # Value from the fixture - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - end -end diff --git a/spec/services/doc_auth/acuant/responses/get_results_response_spec.rb b/spec/services/doc_auth/acuant/responses/get_results_response_spec.rb deleted file mode 100644 index 1fc657f2e15..00000000000 --- a/spec/services/doc_auth/acuant/responses/get_results_response_spec.rb +++ /dev/null @@ -1,523 +0,0 @@ -require 'rails_helper' - -RSpec.describe DocAuth::Acuant::Responses::GetResultsResponse do - let(:config) do - DocAuth::Acuant::Config.new - end - subject(:response) { described_class.new(http_response, config) } - - context 'with a successful result' do - let(:http_response) do - instance_double( - Faraday::Response, - body: AcuantFixtures.get_results_response_success, - ) - end - let(:raw_alerts) { JSON.parse(AcuantFixtures.get_results_response_success)['Alerts'] } - let(:raw_regions) { JSON.parse(AcuantFixtures.get_results_response_success)['Regions'] } - - it 'returns a successful response with no errors' do - expect(response.success?).to eq(true) - expect(response.errors).to eq({}) - expect(response.exception).to be_nil - - response_hash = response.to_h - expected_hash = { - success: true, - errors: {}, - attention_with_barcode: false, - exception: nil, - billed: true, - vendor: 'Acuant', - doc_auth_result: 'Passed', - processed_alerts: a_hash_including( - failed: all(a_hash_including(:name, :result)), - passed: all(a_hash_including(:name, :result)), - ), - log_alert_results: a_hash_including('2d_barcode_content': { no_side: 'Passed' }), - image_metrics: a_hash_including(:back, :front), - alert_failure_count: 2, - tamper_result: 'Passed', - classification_info: { - Back: { - ClassName: 'Identification Card', - Issue: '2014', - IssueType: 'Back', - Name: 'North Dakota (ND) Back', - IssuerCode: 'ND', - IssuerName: 'North Dakota', - CountryCode: 'USA', - IssuerType: 'StateProvince', - }, - Front: { - ClassName: 'Identification Card', - Issue: '2014', - IssueType: 'Non-Driver Identification Card', - Name: 'North Dakota (ND) Non-Driver Identification Card', - IssuerCode: 'ND', - IssuerName: 'North Dakota', - CountryCode: 'USA', - IssuerType: 'StateProvince', - }, - }, - address_line2_present: true, - doc_type_supported: true, - doc_auth_success: true, - selfie_status: :not_processed, - selfie_live: true, - selfie_quality_good: true, - } - - processed_alerts = response_hash[:processed_alerts] - expected_alerts = { - passed: - a_collection_including( - a_hash_including(side: :front, region: 'Flag Pattern'), - a_hash_including(side: :front, region: 'Lower Data Labels Right'), - ), - } - - expect(response_hash).to match(expected_hash) - expect(processed_alerts).to include(expected_alerts) - expect(response.result_code).to eq(DocAuth::Acuant::ResultCodes::PASSED) - expect(response.result_code.billed?).to eq(true) - expect(response.id_type_supported?).to eq(true) - end - - it 'parsed PII from the doc' do - # The PII from the response fixture - expect(response.pii_from_doc).to eq( - first_name: 'JANE', - middle_name: nil, - last_name: 'DOE', - address1: '1000 E AVENUE E', - address2: 'APT E', - city: 'BISMARCK', - state: 'ND', - zipcode: '58501', - dob: '1984-04-01', - state_id_expiration: '2022-10-24', - state_id_issued: '2014-10-24', - state_id_number: 'DOE-84-1165', - state_id_jurisdiction: 'ND', - state_id_type: 'state_id_card', - ) - end - end - - context 'with an attention result' do - let(:http_response) do - instance_double( - Faraday::Response, - body: { - Result: 5, - Alerts: alerts, - Fields: [], - }.to_json, - ) - end - - context 'when the only unsuccessful alert is attention barcode could not be read' do - let(:alerts) do - [{ Result: 5, Key: '2D Barcode Read' }, - { Result: 1, Key: 'Birth Date Valid' }] - end - - it 'is a successful result' do - expect(response.success?).to eq(true) - end - end - - context 'when there are other unsuccessful alerts' do - let(:alerts) do - [{ Result: 5, Key: '2D Barcode Read' }, - { Result: 4, Key: 'Birth Date Crosscheck' }] - end - - it 'is not a successful result' do - expect(response.success?).to eq(false) - end - end - end - - context 'when there are errors and still parsed PII fields' do - let(:http_response) do - instance_double( - Faraday::Response, - body: AcuantFixtures.get_results_response_expired, - ) - end - - it 'is not sucessful, has errors, and still has pii_from_doc' do - aggregate_failures do - expect(response.success?).to eq(false) - - expect(response.errors).to eq( - general: [DocAuth::Errors::DOCUMENT_EXPIRED_CHECK], - front: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - back: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - hints: true, - ) - - expect(response.pii_from_doc).to include( - first_name: 'FAKEY', - last_name: 'MCFAKERSON', - state_id_expiration: '2021-01-14', - state_id_issued: '2017-06-01', - ) - end - end - end - - context 'with a failed result' do - let(:http_response) do - instance_double( - Faraday::Response, - body: AcuantFixtures.get_results_response_failure, - ) - end - let(:raw_alerts) { JSON.parse(AcuantFixtures.get_results_response_success)['Alerts'] } - let(:parsed_response_body) { JSON.parse(AcuantFixtures.get_results_response_failure) } - - it 'returns an unsuccessful response with errors' do - expect(response.success?).to eq(false) - expect(response.errors).to eq( - general: [DocAuth::Errors::ID_NOT_RECOGNIZED], - front: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - back: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - hints: true, - ) - expect(response.to_h[:log_alert_results]).to eq( - document_classification: { no_side: 'Failed' }, - ) - expect(response.exception).to be_nil - expect(response.result_code).to eq(DocAuth::Acuant::ResultCodes::UNKNOWN) - expect(response.result_code.billed?).to eq(false) - end - - context 'when visiual_pattern passes and fails' do - let(:http_response) do - [1, 2].each do |index| - parsed_response_body['Alerts'] << { - Key: 'Visible Pattern', - Name: 'Visible Pattern', - RegionReferences: [], - Result: index, - } - end - - instance_double( - Faraday::Response, - body: parsed_response_body.to_json, - ) - end - - it 'returns log_alert_results for visible_pattern with multiple results comma separated' do - expect(response.to_h[:processed_alerts]).to eq( - passed: [{ name: 'Visible Pattern', result: 'Passed' }], - failed: - [{ name: 'Document Classification', - result: 'Failed' }, - { name: 'Visible Pattern', - result: 'Failed' }], - ) - - expect(response.to_h[:log_alert_results]).to eq( - { visible_pattern: { no_side: 'Failed' }, - document_classification: { no_side: 'Failed' } }, - ) - end - end - - context 'when with an acuant error message' do - let(:http_response) do - parsed_response_body['Alerts'].first['Disposition'] = 'This message does not have a key' - instance_double( - Faraday::Response, - body: parsed_response_body.to_json, - ) - end - - it 'returns the untranslated error' do - expect(response.success?).to eq(false) - expect(response.errors).to eq( - general: [DocAuth::Errors::ID_NOT_RECOGNIZED], - front: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - back: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - hints: true, - ) - expect(response.exception).to be_nil - end - end - - context 'when multiple alerts have the same friendly error' do - let(:http_response) do - parsed_response_body['Alerts'].first['Disposition'] = 'This message does not have a key' - parsed_response_body['Alerts'][1] = parsed_response_body['Alerts'].first - instance_double( - Faraday::Response, - body: parsed_response_body.to_json, - ) - end - - it 'only returns one copy of the each error' do - expect(response.success?).to eq(false) - expect(response.errors).to eq( - general: [DocAuth::Errors::GENERAL_ERROR], - front: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - back: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - hints: true, - ) - expect(response.exception).to be_nil - end - end - - context 'when there are alerts with success result codes' do - let(:http_response) do - instance_double( - Faraday::Response, - body: { - Result: 2, - Alerts: [ - { Result: 1, Key: 'Birth Date Valid' }, - { Result: 2, Key: 'Document Classification' }, - ], - Fields: [], - }.to_json, - ) - end - - it 'does not return errors for alerts with success result codes' do - expect(response.success?).to eq(false) - expect(response.errors).to eq( - general: [DocAuth::Errors::ID_NOT_RECOGNIZED], - front: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - back: [DocAuth::Errors::FALLBACK_FIELD_LEVEL], - hints: true, - ) - expect(response.exception).to be_nil - end - end - - # leaving this as a sanity check, error_generator_spec has these tests now - context 'when front image HDPI is too low' do - let(:http_response) do - parsed_response_body['Images'].first['HorizontalResolution'] = 250 - instance_double( - Faraday::Response, - body: parsed_response_body.to_json, - ) - end - - it 'returns an unsuccessful response with front DPI error' do - expect(response.success?).to eq(false) - expect(response.errors).to eq( - general: [DocAuth::Errors::DPI_LOW_ONE_SIDE], - front: [DocAuth::Errors::DPI_LOW_FIELD], - hints: false, - ) - expect(response.exception).to be_nil - expect(response.result_code).to eq(DocAuth::Acuant::ResultCodes::UNKNOWN) - expect(response.result_code.billed?).to eq(false) - end - end - end - - describe '#attention_with_barcode?' do - let(:result) { DocAuth::Acuant::ResultCodes::PASSED.code } - let(:alerts) { [] } - let(:http_response) do - instance_double( - Faraday::Response, - body: { Result: result, Alerts: alerts, Fields: [] }.to_json, - ) - end - - subject(:attention_with_barcode) { response.attention_with_barcode? } - - it { expect(attention_with_barcode).to eq(false) } - - context 'with multiple errors including barcode attention' do - let(:result) { DocAuth::Acuant::ResultCodes::ATTENTION.code } - let(:alerts) do - [ - { Result: DocAuth::Acuant::ResultCodes::ATTENTION.code, Key: '2D Barcode Read' }, - { Result: DocAuth::Acuant::ResultCodes::ATTENTION.code, Key: 'Birth Date Crosscheck' }, - ] - end - - it { expect(attention_with_barcode).to eq(false) } - end - - context 'with single barcode attention error' do - let(:result) { DocAuth::Acuant::ResultCodes::ATTENTION.code } - let(:alerts) do - [ - { Result: DocAuth::Acuant::ResultCodes::ATTENTION.code, Key: '2D Barcode Read' }, - { Result: DocAuth::Acuant::ResultCodes::PASSED.code, Key: 'Birth Date Valid' }, - ] - end - - it { expect(attention_with_barcode).to eq(true) } - end - end - - describe 'with unsupported id' do - context 'with successful response of unsupported document type' do - let(:http_response) do - instance_double( - Faraday::Response, - body: AcuantFixtures.get_results_response_success_tribal_id, - ) - end - let(:expected_errors) do - { - general: [DocAuth::Errors::DOC_TYPE_CHECK], - front: [DocAuth::Errors::CARD_TYPE], - back: [DocAuth::Errors::CARD_TYPE], - hints: true, - } - end - it 'generates error for doc type' do - expect(response.success?).to eq(false) - expect(response.errors).to eq(expected_errors) - response_hash = response.to_h - expected_hash = { - success: false, - errors: expected_errors, - attention_with_barcode: false, - exception: nil, - billed: true, - vendor: 'Acuant', - doc_auth_result: 'Passed', - processed_alerts: a_hash_including( - failed: all(a_hash_including(:name, :result)), - passed: all(a_hash_including(:name, :result)), - ), - log_alert_results: a_hash_including('2d_barcode_content': { no_side: 'Passed' }), - image_metrics: a_hash_including(:back, :front), - alert_failure_count: 2, - tamper_result: 'Passed', - classification_info: { - Back: { - ClassName: 'Tribal Identification', - Issue: '2014', - IssueType: 'Back', - Name: 'Cowlitz Indian Tribe Back', - IssuerCode: 'ND', - IssuerName: 'Cowlitz Indian Tribe', - CountryCode: 'USA', - IssuerType: 'StateProvince', - }, - Front: { - ClassName: 'Tribal Identification', - Issue: '2014', - IssueType: 'Tribal Identification Card', - Name: 'Cowlitz Indian Tribe Tribal Identification', - IssuerCode: 'ND', - IssuerName: 'Cowlitz Indian Tribe', - CountryCode: 'USA', - IssuerType: 'StateProvince', - }, - }, - address_line2_present: true, - doc_type_supported: false, - doc_auth_success: true, - selfie_status: :not_processed, - selfie_live: true, - selfie_quality_good: true, - } - - processed_alerts = response_hash[:processed_alerts] - expected_alerts = { - passed: - a_collection_including( - a_hash_including(side: :front, region: 'Flag Pattern'), - a_hash_including(side: :front, region: 'Lower Data Labels Right'), - ), - } - - expect(response_hash).to match(expected_hash) - expect(processed_alerts).to include(expected_alerts) - expect(response.result_code).to eq(DocAuth::Acuant::ResultCodes::PASSED) - expect(response.result_code.billed?).to eq(true) - expect(response.id_type_supported?).to eq(false) - end - - context 'with successful response of unsupported document issuing country' do - let(:http_response) do - json_body = JSON.parse(AcuantFixtures.get_results_response_success).tap do |b| - b['Classification']['ClassificationDetails']['Front']['CountryCode'] = 'CAN' - b['Classification']['ClassificationDetails']['Back']['CountryCode'] = 'CAN' - end - instance_double( - Faraday::Response, - body: json_body.to_json, - ) - end - let(:expected_errors) do - { - general: [DocAuth::Errors::DOC_TYPE_CHECK], - front: [DocAuth::Errors::CARD_TYPE], - back: [DocAuth::Errors::CARD_TYPE], - hints: true, - } - end - it 'generates error for doc type' do - expect(response.success?).to eq(false) - expect(response.errors).to eq(expected_errors) - response_hash = response.to_h - expected_hash = { - success: false, - errors: expected_errors, - attention_with_barcode: false, - exception: nil, - billed: true, - vendor: 'Acuant', - doc_auth_result: 'Passed', - processed_alerts: a_hash_including( - failed: all(a_hash_including(:name, :result)), - passed: all(a_hash_including(:name, :result)), - ), - log_alert_results: a_hash_including('2d_barcode_content': { no_side: 'Passed' }), - image_metrics: a_hash_including(:back, :front), - alert_failure_count: 2, - tamper_result: 'Passed', - classification_info: { - Back: { - ClassName: 'Identification Card', - Issue: '2014', - IssueType: 'Back', - Name: 'North Dakota (ND) Back', - IssuerCode: 'ND', - IssuerName: 'North Dakota', - CountryCode: 'CAN', - IssuerType: 'StateProvince', - }, - Front: { - ClassName: 'Identification Card', - Issue: '2014', - IssueType: 'Non-Driver Identification Card', - Name: 'North Dakota (ND) Non-Driver Identification Card', - IssuerCode: 'ND', - IssuerName: 'North Dakota', - CountryCode: 'CAN', - IssuerType: 'StateProvince', - }, - }, - address_line2_present: true, - doc_type_supported: false, - doc_auth_success: true, - selfie_status: :not_processed, - selfie_live: true, - selfie_quality_good: true, - } - - expect(response_hash).to match(expected_hash) - expect(response.result_code).to eq(DocAuth::Acuant::ResultCodes::PASSED) - expect(response.id_type_supported?).to eq(false) - end - end - end - end -end diff --git a/spec/services/doc_auth/issuer_types_spec.rb b/spec/services/doc_auth/issuer_types_spec.rb new file mode 100644 index 00000000000..d414ab96272 --- /dev/null +++ b/spec/services/doc_auth/issuer_types_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +RSpec.describe DocAuth::IssuerTypes do + describe '.from_int' do + it 'is a result code for the int' do + issuer_type = DocAuth::IssuerTypes.from_int(1) + expect(issuer_type).to be_a(DocAuth::IssuerTypes::IssuerType) + end + + it 'is nil when there is no matching code' do + issuer_type = DocAuth::IssuerTypes.from_int(999) + expect(issuer_type).to be_nil + end + end +end diff --git a/spec/services/doc_auth/lexis_nexis/lexis_nexis_client_spec.rb b/spec/services/doc_auth/lexis_nexis/lexis_nexis_client_spec.rb index 52d13e68842..9173774d17e 100644 --- a/spec/services/doc_auth/lexis_nexis/lexis_nexis_client_spec.rb +++ b/spec/services/doc_auth/lexis_nexis/lexis_nexis_client_spec.rb @@ -22,12 +22,6 @@ ) end - describe '#create_document' do - it 'raises a NotImplemented error' do - expect { client.create_document }.to raise_error(NotImplementedError) - end - end - describe '#post_images' do before do stub_request(:post, image_upload_url).to_return( diff --git a/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb b/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb index 4d1287f47e4..1472dee4dbc 100644 --- a/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb +++ b/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb @@ -5,18 +5,8 @@ let(:liveness_checking_required) { false } - it 'implements all the public methods of the real Acuant client' do - expect( - described_class.instance_methods.sort, - ).to eq( - DocAuth::Acuant::AcuantClient.instance_methods. - concat(DocAuth::Mock::YmlLoaderConcern.instance_methods).sort, - ) - end - + let(:instance_id) { 'fake-instance-id' } it 'allows doc auth without any external requests' do - create_document_response = client.create_document - instance_id = create_document_response.instance_id post_front_image_response = client.post_front_image( instance_id: instance_id, image: DocAuthImageFixtures.document_front_image, @@ -76,8 +66,6 @@ ClassName: Tribal Identification YAML - create_document_response = client.create_document - instance_id = create_document_response.instance_id client.post_front_image( instance_id: instance_id, image: yaml, @@ -116,8 +104,6 @@ ClassName: Tribal Identification YAML - create_document_response = client.create_document - instance_id = create_document_response.instance_id client.post_front_image( instance_id: instance_id, image: yaml, @@ -139,13 +125,29 @@ expect(get_results_response.extra[:classification_info]).to include(:Front, :Back) end it 'allows responses to be mocked' do - described_class.mock_response!(method: :create_document, response: 'Create doc test') + response = DocAuth::Response.new( + success: true, + errors: nil, + exception: nil, + extra: { vendor: 'Mock' }, + ) + DocAuth::Mock::DocAuthMockClient.mock_response!(method: :post_front_image, response: response) - expect(described_class.new.create_document).to eq('Create doc test') + expect( + described_class.new.post_front_image( + image: DocAuthImageFixtures.document_front_image, + instance_id: 'fake-instance-id', + ), + ).to eq(response) described_class.reset! - expect(described_class.new.create_document).to_not eq('Create doc test') + expect( + described_class.new.post_front_image( + image: DocAuthImageFixtures.document_front_image, + instance_id: 'fake-instance-id', + ), + ).to_not eq(response) end context 'when checking results gives a failure' do diff --git a/spec/services/doc_auth/mock/result_response_spec.rb b/spec/services/doc_auth/mock/result_response_spec.rb index 5a731eb2201..10554f4c327 100644 --- a/spec/services/doc_auth/mock/result_response_spec.rb +++ b/spec/services/doc_auth/mock/result_response_spec.rb @@ -300,7 +300,7 @@ ) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::Acuant::ResultCodes::PASSED.name, + doc_auth_result: DocAuth::ResultCodes::PASSED.name, billed: true, classification_info: {}, workflow: 'test_non_liveness_workflow', @@ -331,7 +331,7 @@ expect(response.pii_from_doc).to eq({}) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::Acuant::ResultCodes::CAUTION.name, + doc_auth_result: DocAuth::ResultCodes::CAUTION.name, billed: true, classification_info: {}, liveness_checking_required: false, @@ -358,7 +358,7 @@ expect(response.pii_from_doc).to eq({}) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::Acuant::ResultCodes::FAILED.name, + doc_auth_result: DocAuth::ResultCodes::FAILED.name, billed: true, classification_info: {}, liveness_checking_required: false, @@ -406,7 +406,7 @@ ) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::Acuant::ResultCodes::PASSED.name, + doc_auth_result: DocAuth::ResultCodes::PASSED.name, billed: true, classification_info: {}, liveness_checking_required: false, diff --git a/spec/services/doc_auth/acuant/result_codes_spec.rb b/spec/services/doc_auth/result_codes_spec.rb similarity index 50% rename from spec/services/doc_auth/acuant/result_codes_spec.rb rename to spec/services/doc_auth/result_codes_spec.rb index d88856c4f29..66f0fcc4a4c 100644 --- a/spec/services/doc_auth/acuant/result_codes_spec.rb +++ b/spec/services/doc_auth/result_codes_spec.rb @@ -1,15 +1,15 @@ require 'rails_helper' -RSpec.describe DocAuth::Acuant::ResultCodes do +RSpec.describe DocAuth::ResultCodes do describe '.from_int' do it 'is a result code for the int' do - result_code = DocAuth::Acuant::ResultCodes.from_int(1) - expect(result_code).to be_a(DocAuth::Acuant::ResultCodes::ResultCode) + result_code = DocAuth::ResultCodes.from_int(1) + expect(result_code).to be_a(DocAuth::ResultCodes::ResultCode) expect(result_code.billed?).to eq(true) end it 'is nil when there is no matching code' do - result_code = DocAuth::Acuant::ResultCodes.from_int(999) + result_code = DocAuth::ResultCodes.from_int(999) expect(result_code).to be_nil end end diff --git a/spec/services/doc_auth_router_spec.rb b/spec/services/doc_auth_router_spec.rb index bdf4214871f..bd366c23e49 100644 --- a/spec/services/doc_auth_router_spec.rb +++ b/spec/services/doc_auth_router_spec.rb @@ -6,15 +6,6 @@ allow(IdentityConfig.store).to receive(:doc_auth_vendor).and_return(doc_auth_vendor) end - context 'for acuant' do - let(:doc_auth_vendor) { Idp::Constants::Vendors::ACUANT } - - it 'is a translation-proxied acuant client' do - expect(DocAuthRouter.client).to be_a(DocAuthRouter::DocAuthErrorTranslatorProxy) - expect(DocAuthRouter.client.client).to be_a(DocAuth::Acuant::AcuantClient) - end - end - context 'for lexisnexis' do let(:doc_auth_vendor) { Idp::Constants::Vendors::LEXIS_NEXIS } diff --git a/spec/support/acuant_fixtures.rb b/spec/support/acuant_fixtures.rb index 96edb937090..99c071ff83e 100644 --- a/spec/support/acuant_fixtures.rb +++ b/spec/support/acuant_fixtures.rb @@ -1,28 +1,8 @@ module AcuantFixtures - def self.create_document_response - load_response_fixture('create_document_response.json') - end - - def self.get_results_response_success - load_response_fixture('get_results_response_success.json') - end - - def self.get_results_response_success_tribal_id - load_response_fixture('get_results_response_success_tribal_id.json') - end - def self.get_results_response_failure load_response_fixture('get_results_response_failure.json') end - def self.get_results_response_expired - load_response_fixture('get_results_response_expired.json') - end - - def self.facial_match_response_failure - load_response_fixture('facial_match_response_failure.json') - end - def self.load_response_fixture(filename) path = File.join( File.dirname(__FILE__), diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index da996849d65..bcae1310790 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -361,16 +361,16 @@ def mock_doc_auth_acuant_http_5xx_status(method = :post_front_image) ) end - def mock_doc_auth_acuant_error_unknown + def mock_doc_auth_lexis_nexis_error_unknown failed_http_response = instance_double( Faraday::Response, - body: AcuantFixtures.get_results_response_failure, + body: LexisNexisFixtures.true_id_get_results_response_failure, ) DocAuth::Mock::DocAuthMockClient.mock_response!( method: :get_results, - response: DocAuth::Acuant::Responses::GetResultsResponse.new( + response: DocAuth::LexisNexis::Responses::TrueIdResponse.new( failed_http_response, - DocAuth::Acuant::Config.new, + DocAuth::LexisNexis::Config.new, ), ) end diff --git a/spec/support/lexis_nexis_fixtures.rb b/spec/support/lexis_nexis_fixtures.rb index c9782428861..1acf436c49b 100644 --- a/spec/support/lexis_nexis_fixtures.rb +++ b/spec/support/lexis_nexis_fixtures.rb @@ -202,6 +202,10 @@ def true_id_response_failure_tampering read_fixture_file_at_path('true_id/true_id_response_tampering_failure.json') end + def true_id_get_results_response_failure + read_fixture_file_at_path('true_id/get_results_response_failure.json') + end + private def read_fixture_file_at_path(filepath) From 05cba2cee72604e89f9cfbea553385894ee8a9c8 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Thu, 29 Feb 2024 16:49:44 -0500 Subject: [PATCH 2/9] fix formatting & outdated tests --- app/services/doc_auth/result_codes.rb | 58 +++++++++---------- .../mock/doc_auth_mock_client_spec.rb | 7 +-- 2 files changed, 31 insertions(+), 34 deletions(-) diff --git a/app/services/doc_auth/result_codes.rb b/app/services/doc_auth/result_codes.rb index 9582954e6e4..a7f9350219f 100644 --- a/app/services/doc_auth/result_codes.rb +++ b/app/services/doc_auth/result_codes.rb @@ -1,36 +1,36 @@ module DocAuth - module ResultCodes - ResultCode = Struct.new(:code, :name, :billed) do - alias_method :billed?, :billed - end + module ResultCodes + ResultCode = Struct.new(:code, :name, :billed) do + alias_method :billed?, :billed + end - # The authentication test results are unknown. We are not billed for these - UNKNOWN = ResultCode.new(0, 'Unknown', false).freeze - # The authentication test passed. - PASSED = ResultCode.new(1, 'Passed', true).freeze - # The authentication test failed. - FAILED = ResultCode.new(2, 'Failed', true).freeze - # The authentication test was skipped (was not run). - SKIPPED = ResultCode.new(3, 'Skipped', true).freeze - # The authentication test was inconclusive and further investigation is warranted. - CAUTION = ResultCode.new(4, 'Caution', true).freeze - # The authentication test results requires user attention. - ATTENTION = ResultCode.new(5, 'Attention', true).freeze + # The authentication test results are unknown. We are not billed for these + UNKNOWN = ResultCode.new(0, 'Unknown', false).freeze + # The authentication test passed. + PASSED = ResultCode.new(1, 'Passed', true).freeze + # The authentication test failed. + FAILED = ResultCode.new(2, 'Failed', true).freeze + # The authentication test was skipped (was not run). + SKIPPED = ResultCode.new(3, 'Skipped', true).freeze + # The authentication test was inconclusive and further investigation is warranted. + CAUTION = ResultCode.new(4, 'Caution', true).freeze + # The authentication test results requires user attention. + ATTENTION = ResultCode.new(5, 'Attention', true).freeze - ALL = [ - UNKNOWN, - PASSED, - FAILED, - SKIPPED, - CAUTION, - ATTENTION, - ].freeze + ALL = [ + UNKNOWN, + PASSED, + FAILED, + SKIPPED, + CAUTION, + ATTENTION, + ].freeze - BY_CODE = ALL.index_by(&:code).freeze + BY_CODE = ALL.index_by(&:code).freeze - # @return [ResultCode] - def self.from_int(code) - BY_CODE[code] - end + # @return [ResultCode] + def self.from_int(code) + BY_CODE[code] end + end end diff --git a/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb b/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb index 1472dee4dbc..16f822a2bc9 100644 --- a/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb +++ b/spec/services/doc_auth/mock/doc_auth_mock_client_spec.rb @@ -19,9 +19,6 @@ instance_id: instance_id, ) - expect(create_document_response.success?).to eq(true) - expect(create_document_response.instance_id).to_not be_blank - expect(post_front_image_response.success?).to eq(true) expect(post_back_image_response.success?).to eq(true) @@ -75,7 +72,7 @@ image: yaml, ) get_results_response = client.get_results( - instance_id: create_document_response.instance_id, + instance_id: instance_id, ) expect(get_results_response.pii_from_doc).to eq( @@ -113,7 +110,7 @@ image: yaml, ) get_results_response = client.get_results( - instance_id: create_document_response.instance_id, + instance_id: instance_id, ) expect(get_results_response.attention_with_barcode?).to eq(false) errors = get_results_response.errors From 349b334c4a246c0ba65fc907ad5075793f36f38b Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Fri, 1 Mar 2024 14:53:53 -0500 Subject: [PATCH 3/9] fix broken feature tests & remove out of date lexis_nexis fixture --- .../doc_auth/redo_document_capture_spec.rb | 20 +- .../true_id/get_results_response_failure.json | 218 ------------------ spec/support/features/doc_auth_helper.rb | 14 -- spec/support/lexis_nexis_fixtures.rb | 4 - 4 files changed, 3 insertions(+), 253 deletions(-) delete mode 100644 spec/fixtures/proofing/lexis_nexis/true_id/get_results_response_failure.json diff --git a/spec/features/idv/doc_auth/redo_document_capture_spec.rb b/spec/features/idv/doc_auth/redo_document_capture_spec.rb index 78d98d73b62..4f00372cc24 100644 --- a/spec/features/idv/doc_auth/redo_document_capture_spec.rb +++ b/spec/features/idv/doc_auth/redo_document_capture_spec.rb @@ -204,7 +204,7 @@ before do sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_lexis_nexis_error_unknown + mock_general_doc_auth_client_error(:get_results) attach_and_submit_images click_try_again end @@ -263,18 +263,6 @@ it_behaves_like 'image re-upload allowed' end - context 'unknown error for acuant', allow_browser_log: true do - before do - sign_in_and_2fa_user - complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_lexis_nexis_error_unknown - attach_and_submit_images - click_try_again - end - - it_behaves_like 'image re-upload not allowed' - end - context 'when selfie is enabled' do context 'error due to data issue with 2xx status code', allow_browser_log: true do before do @@ -286,7 +274,7 @@ start_idv_from_sp sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_lexis_nexis_error_unknown + mock_doc_auth_success_face_match_fail attach_images attach_selfie submit_images @@ -405,12 +393,10 @@ allow_any_instance_of(FederatedProtocols::Oidc). to receive(:biometric_comparison_required?).and_return(true) allow_any_instance_of(DocAuth::Response).to receive(:selfie_status).and_return(:fail) - allow(IdentityConfig.store).to receive(:doc_auth_check_failed_image_resubmission_enabled). - and_return(false) start_idv_from_sp sign_in_and_2fa_user complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_lexis_nexis_error_unknown + mock_doc_auth_success_face_match_fail attach_images attach_selfie submit_images diff --git a/spec/fixtures/proofing/lexis_nexis/true_id/get_results_response_failure.json b/spec/fixtures/proofing/lexis_nexis/true_id/get_results_response_failure.json deleted file mode 100644 index 03ff6ae818d..00000000000 --- a/spec/fixtures/proofing/lexis_nexis/true_id/get_results_response_failure.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "Alerts": [ - { - "Actions": "This test may fail if a document cannot be successfully classified as a supported document type. This may occur if the document is fraudulent as some fraudulent documents differ so much from authentic documents that they will not be recognized as that type of document. This may also occur if a valid document is significantly worn or damaged or if the document is of a new or different type that is not yet supported by the library. The document should be examined manually.", - "DataFieldReferences": [], - "Description": "Verified that the type of document is supported and is able to be fully authenticated.", - "Disposition": "The document type could not be determined", - "FieldReferences": [], - "Id": "555ce005-8bc5-46fa-9a9e-6576a71f484c", - "ImageReferences": [], - "Information": "Verified that the document is recognized as a supported document type and that the type of document can be fully authenticated.", - "Key": "Document Classification", - "Name": "Document Classification", - "RegionReferences": [], - "Result": 2 - } - ], - "AuthenticationSensitivity": 0, - "Biographic": { - "Age": 0, - "BirthDate": null, - "ExpirationDate": null, - "FullName": null, - "Gender": 0, - "Photo": null - }, - "Classification": { - "ClassificationDetails": { - "Back": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - }, - "Front": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "Mode": 0, - "OrientationChanged": false, - "PresentationChanged": false, - "Type": { - "Class": 0, - "ClassCode": null, - "ClassName": "Unknown", - "CountryCode": "", - "GeographicRegions": null, - "Id": "00000000-0000-0000-0000-000000000000", - "IsGeneric": true, - "Issue": null, - "IssueType": null, - "IssuerCode": null, - "IssuerName": null, - "IssuerType": 0, - "KeesingCode": null, - "Name": "Unknown", - "Size": 0, - "SupportedImages": [ - { - "Light": 0, - "Side": 0 - }, - { - "Light": 1, - "Side": 0 - }, - { - "Light": 2, - "Side": 0 - }, - { - "Light": 0, - "Side": 1 - }, - { - "Light": 1, - "Side": 1 - }, - { - "Light": 2, - "Side": 1 - } - ] - } - }, - "DataFields": [], - "Device": { - "HasContactlessChipReader": false, - "HasMagneticStripeReader": false, - "SerialNumber": "xxxxx", - "Type": { - "Manufacturer": "Login.gov", - "Model": "Doc Auth 1.0", - "SensorType": 3 - } - }, - "EngineVersion": "2.15.1.171", - "Fields": [], - "Images": [ - { - "GlareMetric": null, - "HorizontalResolution": 96, - "Id": "fe7c612a-66bb-46ab-8b06-b28f657b6482", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": null, - "Side": 0, - "Uri": "https://services.assureid.net/AssureIDService/Document/97b0215a-7858-4104-b1f3-17dbaf609140/Image?side=Front&light=White", - "VerticalResolution": 96 - }, - { - "GlareMetric": null, - "HorizontalResolution": 96, - "Id": "60359af3-d87e-46da-ab5b-883ebfec923f", - "IsCropped": false, - "IsTampered": false, - "Light": 0, - "MimeType": "image/jpeg", - "SharpnessMetric": null, - "Side": 1, - "Uri": "https://services.assureid.net/AssureIDService/Document/97b0215a-7858-4104-b1f3-17dbaf609140/Image?side=Back&light=White", - "VerticalResolution": 96 - } - ], - "InstanceId": "97b0215a-7858-4104-b1f3-17dbaf609140", - "LibraryVersion": "20.05.07.182", - "ProcessMode": 2, - "Regions": [], - "Result": 0, - "Subscription": { - "DocumentProcessMode": 2, - "Id": "fake-subscription-id", - "IsActive": true, - "IsDevelopment": true, - "IsTrial": false, - "Name": "Dev GSA iProov", - "StorePII": false - } -} diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index bcae1310790..96a05d13fc9 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -361,20 +361,6 @@ def mock_doc_auth_acuant_http_5xx_status(method = :post_front_image) ) end - def mock_doc_auth_lexis_nexis_error_unknown - failed_http_response = instance_double( - Faraday::Response, - body: LexisNexisFixtures.true_id_get_results_response_failure, - ) - DocAuth::Mock::DocAuthMockClient.mock_response!( - method: :get_results, - response: DocAuth::LexisNexis::Responses::TrueIdResponse.new( - failed_http_response, - DocAuth::LexisNexis::Config.new, - ), - ) - end - def verify_phone_otp choose_idv_otp_delivery_method_sms fill_in_code_with_last_phone_otp diff --git a/spec/support/lexis_nexis_fixtures.rb b/spec/support/lexis_nexis_fixtures.rb index 1acf436c49b..c9782428861 100644 --- a/spec/support/lexis_nexis_fixtures.rb +++ b/spec/support/lexis_nexis_fixtures.rb @@ -202,10 +202,6 @@ def true_id_response_failure_tampering read_fixture_file_at_path('true_id/true_id_response_tampering_failure.json') end - def true_id_get_results_response_failure - read_fixture_file_at_path('true_id/get_results_response_failure.json') - end - private def read_fixture_file_at_path(filepath) From b84e93023812dd06e9aeabc40e92daf7bc7aa793 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Fri, 1 Mar 2024 17:30:19 -0500 Subject: [PATCH 4/9] remove outdated references to acuant, mostly from specs & mocks --- app/services/doc_auth/mock/result_response.rb | 31 ------------ app/services/outage_status.rb | 4 -- .../idv/unavailable_controller_spec.rb | 2 - .../idv/doc_auth/document_capture_spec.rb | 2 +- .../doc_auth/redo_document_capture_spec.rb | 24 ---------- spec/features/idv/outage_spec.rb | 4 +- ...password_reset_from_disavowal_form_spec.rb | 4 +- spec/lib/feature_management_spec.rb | 4 +- spec/services/idv/profile_maker_spec.rb | 2 +- spec/services/outage_status_spec.rb | 2 +- spec/support/acuant_fixtures.rb | 14 ------ spec/support/features/doc_auth_helper.rb | 48 ------------------- 12 files changed, 7 insertions(+), 134 deletions(-) delete mode 100644 spec/support/acuant_fixtures.rb diff --git a/app/services/doc_auth/mock/result_response.rb b/app/services/doc_auth/mock/result_response.rb index 3f46020a9c3..d1216c45602 100644 --- a/app/services/doc_auth/mock/result_response.rb +++ b/app/services/doc_auth/mock/result_response.rb @@ -93,37 +93,6 @@ def attention_with_barcode? parsed_alerts == [ATTENTION_WITH_BARCODE_ALERT] end - def self.create_image_error_response(status, side) - errors = case status - when 438 - { - general: [Errors::IMAGE_LOAD_FAILURE], - side.to_sym => [Errors::IMAGE_LOAD_FAILURE_FIELD], - } - when 439 - { - general: [Errors::PIXEL_DEPTH_FAILURE], - side.to_sym => [Errors::IMAGE_LOAD_FAILURE_FIELD], - } - when 440 - { - general: [Errors::IMAGE_SIZE_FAILURE], - side.to_sym => [Errors::IMAGE_SIZE_FAILURE_FIELD], - } - end - message = [ - 'Unexpected HTTP response', - status, - ].join(' ') - exception = DocAuth::RequestError.new(message, status) - DocAuth::Response.new( - success: false, - errors: errors, - exception: exception, - extra: { vendor: 'Mock' }, - ) - end - def self.create_network_error_response errors = { network: true } DocAuth::Response.new( diff --git a/app/services/outage_status.rb b/app/services/outage_status.rb index 994ef356124..871ef778816 100644 --- a/app/services/outage_status.rb +++ b/app/services/outage_status.rb @@ -2,7 +2,6 @@ class OutageStatus include ActionView::Helpers::TranslationHelper IDV_VENDORS = %i[ - acuant lexisnexis_instant_verify lexisnexis_trueid idv_scheduled_maintenance @@ -12,8 +11,6 @@ class OutageStatus def vendor_outage?(vendor) status = case vendor - when :acuant - IdentityConfig.store.vendor_status_acuant when :lexisnexis_instant_verify IdentityConfig.store.vendor_status_lexisnexis_instant_verify when :lexisnexis_trueid @@ -91,7 +88,6 @@ def track_event(analytics, redirect_from: nil) analytics.vendor_outage( vendor_status: { - acuant: IdentityConfig.store.vendor_status_acuant, lexisnexis_instant_verify: IdentityConfig.store.vendor_status_lexisnexis_instant_verify, lexisnexis_trueid: IdentityConfig.store.vendor_status_lexisnexis_trueid, sms: IdentityConfig.store.vendor_status_sms, diff --git a/spec/controllers/idv/unavailable_controller_spec.rb b/spec/controllers/idv/unavailable_controller_spec.rb index e168627c767..e769a0fe389 100644 --- a/spec/controllers/idv/unavailable_controller_spec.rb +++ b/spec/controllers/idv/unavailable_controller_spec.rb @@ -25,7 +25,6 @@ 'Vendor Outage', redirect_from: nil, vendor_status: { - acuant: :operational, lexisnexis_instant_verify: :operational, lexisnexis_trueid: :operational, sms: :operational, @@ -48,7 +47,6 @@ 'Vendor Outage', redirect_from: SignUp::RegistrationsController::CREATE_ACCOUNT, vendor_status: { - acuant: :operational, lexisnexis_instant_verify: :operational, lexisnexis_trueid: :operational, sms: :operational, diff --git a/spec/features/idv/doc_auth/document_capture_spec.rb b/spec/features/idv/doc_auth/document_capture_spec.rb index 84e677d9c2f..deb1a2cc7c9 100644 --- a/spec/features/idv/doc_auth/document_capture_spec.rb +++ b/spec/features/idv/doc_auth/document_capture_spec.rb @@ -79,7 +79,7 @@ end end - context 'rate limits calls to acuant', allow_browser_log: true do + context 'rate limits calls to backend docauth vendor', allow_browser_log: true do let(:fake_attempts_tracker) { IrsAttemptsApiTrackingHelper::FakeAttemptsTracker.new } before do allow_any_instance_of(ApplicationController).to receive( diff --git a/spec/features/idv/doc_auth/redo_document_capture_spec.rb b/spec/features/idv/doc_auth/redo_document_capture_spec.rb index 4f00372cc24..1d9444bf60d 100644 --- a/spec/features/idv/doc_auth/redo_document_capture_spec.rb +++ b/spec/features/idv/doc_auth/redo_document_capture_spec.rb @@ -239,30 +239,6 @@ it_behaves_like 'image re-upload allowed' end - context 'error due to data issue with 4xx status code with assureid', allow_browser_log: true do - before do - sign_in_and_2fa_user - complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_http_4xx_status(440) - attach_and_submit_images - click_try_again - end - it_behaves_like 'inline error for 4xx status shown', 440 - it_behaves_like 'image re-upload not allowed' - end - - context 'error due to data issue with 5xx status code with assureid', allow_browser_log: true do - before do - sign_in_and_2fa_user - complete_doc_auth_steps_before_document_capture_step - mock_doc_auth_acuant_http_5xx_status - attach_and_submit_images - click_try_again - end - - it_behaves_like 'image re-upload allowed' - end - context 'when selfie is enabled' do context 'error due to data issue with 2xx status code', allow_browser_log: true do before do diff --git a/spec/features/idv/outage_spec.rb b/spec/features/idv/outage_spec.rb index 4258e9d900d..16da42c3fec 100644 --- a/spec/features/idv/outage_spec.rb +++ b/spec/features/idv/outage_spec.rb @@ -20,7 +20,6 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms) let(:new_password) { 'some really awesome new password' } let(:pii) { { ssn: '666-66-1234', dob: '1920-01-01', first_name: 'alice' } } - let(:vendor_status_acuant) { :operational } let(:vendor_status_lexisnexis_instant_verify) { :operational } let(:vendor_status_lexisnexis_phone_finder) { :operational } let(:vendor_status_lexisnexis_trueid) { :operational } @@ -33,7 +32,6 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms) let(:vendors) do %w[ - acuant lexisnexis_instant_verify lexisnexis_phone_finder lexisnexis_trueid @@ -237,7 +235,7 @@ def sign_in_with_idv_required(user:, sms_or_totp: :sms) end end - %w[acuant lexisnexis_instant_verify lexisnexis_trueid].each do |service| + %w[lexisnexis_instant_verify lexisnexis_trueid].each do |service| context "vendor_status_#{service} set to full_outage", js: true do let(:"vendor_status_#{service}") { :full_outage } diff --git a/spec/forms/event_disavowal/password_reset_from_disavowal_form_spec.rb b/spec/forms/event_disavowal/password_reset_from_disavowal_form_spec.rb index a68373ee313..cab54a33c7c 100644 --- a/spec/forms/event_disavowal/password_reset_from_disavowal_form_spec.rb +++ b/spec/forms/event_disavowal/password_reset_from_disavowal_form_spec.rb @@ -31,7 +31,7 @@ let(:user) { create(:user, :proofed) } it 'destroys the proofing component' do - ProofingComponent.create(user_id: user.id, document_check: 'acuant') + ProofingComponent.create(user_id: user.id, document_check: 'mock') subject.submit(password: new_password) @@ -41,7 +41,7 @@ context 'user does not have an active profile' do it 'does not destroy the proofing component' do - ProofingComponent.create(user_id: user.id, document_check: 'acuant') + ProofingComponent.create(user_id: user.id, document_check: 'mock') subject.submit(password: new_password) diff --git a/spec/lib/feature_management_spec.rb b/spec/lib/feature_management_spec.rb index ff3fb85232c..9eaff2be951 100644 --- a/spec/lib/feature_management_spec.rb +++ b/spec/lib/feature_management_spec.rb @@ -493,13 +493,11 @@ describe '#idv_available?' do let(:idv_available) { true } - let(:vendor_status_acuant) { :operational } let(:vendor_status_lexisnexis_instant_verify) { :operational } let(:vendor_status_lexisnexis_trueid) { :operational } before do allow(IdentityConfig.store).to receive(:idv_available).and_return(idv_available) - allow(IdentityConfig.store).to receive(:vendor_status_acuant).and_return(vendor_status_acuant) allow(IdentityConfig.store).to receive(:vendor_status_lexisnexis_instant_verify). and_return(vendor_status_lexisnexis_instant_verify) allow(IdentityConfig.store).to receive(:vendor_status_lexisnexis_trueid). @@ -517,7 +515,7 @@ end end - %w[acuant lexisnexis_instant_verify lexisnexis_trueid].each do |service| + %w[lexisnexis_instant_verify lexisnexis_trueid].each do |service| context "#{service} is in :full_outage" do let(:"vendor_status_#{service}") { :full_outage } it 'returns false' do diff --git a/spec/services/idv/profile_maker_spec.rb b/spec/services/idv/profile_maker_spec.rb index ba8fe5e4658..ff18973a700 100644 --- a/spec/services/idv/profile_maker_spec.rb +++ b/spec/services/idv/profile_maker_spec.rb @@ -17,7 +17,7 @@ end it 'creates an inactive Profile with encrypted PII' do - proofing_component = ProofingComponent.create(user_id: user.id, document_check: 'acuant') + proofing_component = ProofingComponent.create(user_id: user.id, document_check: 'mock') profile = subject.save_profile( fraud_pending_reason: nil, gpo_verification_needed: false, diff --git a/spec/services/outage_status_spec.rb b/spec/services/outage_status_spec.rb index 99ff222386c..27b2a9c9306 100644 --- a/spec/services/outage_status_spec.rb +++ b/spec/services/outage_status_spec.rb @@ -41,7 +41,7 @@ context 'when an idv vendor has an outage' do before do - allow(IdentityConfig.store).to receive(:vendor_status_acuant). + allow(IdentityConfig.store).to receive(:vendor_status_lexisnexis_trueid). and_return(:full_outage) end diff --git a/spec/support/acuant_fixtures.rb b/spec/support/acuant_fixtures.rb deleted file mode 100644 index 99c071ff83e..00000000000 --- a/spec/support/acuant_fixtures.rb +++ /dev/null @@ -1,14 +0,0 @@ -module AcuantFixtures - def self.get_results_response_failure - load_response_fixture('get_results_response_failure.json') - end - - def self.load_response_fixture(filename) - path = File.join( - File.dirname(__FILE__), - '../fixtures/acuant_responses', - filename, - ) - File.read(path) - end -end diff --git a/spec/support/features/doc_auth_helper.rb b/spec/support/features/doc_auth_helper.rb index 96a05d13fc9..74e9a532118 100644 --- a/spec/support/features/doc_auth_helper.rb +++ b/spec/support/features/doc_auth_helper.rb @@ -225,23 +225,6 @@ def complete_proofing_steps(with_selfie: false) click_agree_and_continue end - def mock_doc_auth_no_name_pii(method) - pii_with_no_name = Idp::Constants::MOCK_IDV_APPLICANT.dup - pii_with_no_name[:last_name] = nil - DocAuth::Mock::DocAuthMockClient.mock_response!( - method: method, - response: DocAuth::Response.new( - pii_from_doc: pii_with_no_name, - extra: { - doc_auth_result: 'Passed', - billed: true, - }, - success: true, - errors: {}, - ), - ) - end - def mock_general_doc_auth_client_error(method) DocAuth::Mock::DocAuthMockClient.mock_response!( method: method, @@ -283,22 +266,6 @@ def mock_doc_auth_success_face_match_fail ) end - def mock_doc_auth_failure_face_match_fail - failure_response = instance_double( - Faraday::Response, - status: 200, - body: LexisNexisFixtures.true_id_response_failure_no_liveness, - ) - DocAuth::Mock::DocAuthMockClient.mock_response!( - method: :get_results, - response: DocAuth::LexisNexis::Responses::TrueIdResponse.new( - failure_response, - DocAuth::LexisNexis::Config.new, - true, # liveness_checking_enabled - ), - ) - end - def mock_doc_auth_failure_face_match_pass failure_response = instance_double( Faraday::Response, @@ -346,21 +313,6 @@ def mock_doc_auth_trueid_http_non2xx_status(status) ) end - # @param [Object] status one of 440, 438, 439 - def mock_doc_auth_acuant_http_4xx_status(status, method = :post_front_image) - DocAuth::Mock::DocAuthMockClient.mock_response!( - method: method, - response: DocAuth::Mock::ResultResponse.create_image_error_response(status, 'front'), - ) - end - - def mock_doc_auth_acuant_http_5xx_status(method = :post_front_image) - DocAuth::Mock::DocAuthMockClient.mock_response!( - method: method, - response: DocAuth::Mock::ResultResponse.create_network_error_response, - ) - end - def verify_phone_otp choose_idv_otp_delivery_method_sms fill_in_code_with_last_phone_otp From 9bbccef498609c318f2b1f58efafbb18878aedb1 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Fri, 1 Mar 2024 17:52:05 -0500 Subject: [PATCH 5/9] changelog: Internal, DocAuth, remove unused backend integration with acuant assure id From 0d639218c4fe99ea8c154e5369401e9b83bbe571 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Mon, 4 Mar 2024 11:00:01 -0500 Subject: [PATCH 6/9] WIPWIP respond to zach feedback WIPWIP --- .gitignore | 2 + app/services/doc_auth/issuer_types.rb | 29 ---------- .../doc_auth/lexis_nexis/issuer_types.rb | 31 ++++++++++ app/services/doc_auth/response.rb | 28 ++++----- app/services/doc_auth/result_codes.rb | 58 ++++++++++--------- .../{ => lexis_nexis}/issuer_types_spec.rb | 2 +- .../{ => lexis_nexis}/result_codes_spec.rb | 2 +- 7 files changed, 79 insertions(+), 73 deletions(-) delete mode 100644 app/services/doc_auth/issuer_types.rb create mode 100644 app/services/doc_auth/lexis_nexis/issuer_types.rb rename spec/services/doc_auth/{ => lexis_nexis}/issuer_types_spec.rb (88%) rename spec/services/doc_auth/{ => lexis_nexis}/result_codes_spec.rb (89%) diff --git a/.gitignore b/.gitignore index a253a521441..10e1f2f207c 100644 --- a/.gitignore +++ b/.gitignore @@ -99,3 +99,5 @@ saml_*.key yarn-debug.log* yarn-error.log* .yarn-integrity + +11892Notes.txt diff --git a/app/services/doc_auth/issuer_types.rb b/app/services/doc_auth/issuer_types.rb deleted file mode 100644 index bee0589b6dd..00000000000 --- a/app/services/doc_auth/issuer_types.rb +++ /dev/null @@ -1,29 +0,0 @@ -module DocAuth - module IssuerTypes - IssuerType = Struct.new(:code, :name) - - UNKNOWN = IssuerType.new(0, 'Unknown').freeze - COUNTRY = IssuerType.new(1, 'Country').freeze - STATE_OR_PROVINCE = IssuerType.new(2, 'StateProvince').freeze - TRIBAL = IssuerType.new(3, 'Tribal').freeze - MUNICIPALITY = IssuerType.new(4, 'Municipality').freeze - BUSINESS = IssuerType.new(5, 'Business').freeze - OTHER = IssuerType.new(6, 'Other').freeze - - ALL = [ - UNKNOWN, - COUNTRY, - STATE_OR_PROVINCE, - TRIBAL, - MUNICIPALITY, - BUSINESS, - OTHER, - ].freeze - - BY_CODE = ALL.index_by(&:code).freeze - - def self.from_int(code) - BY_CODE[code] - end - end -end diff --git a/app/services/doc_auth/lexis_nexis/issuer_types.rb b/app/services/doc_auth/lexis_nexis/issuer_types.rb new file mode 100644 index 00000000000..1240d843bdc --- /dev/null +++ b/app/services/doc_auth/lexis_nexis/issuer_types.rb @@ -0,0 +1,31 @@ +module DocAuth + module LexisNexis + module IssuerTypes + IssuerType = Struct.new(:code, :name) + + UNKNOWN = IssuerType.new(0, 'Unknown').freeze + COUNTRY = IssuerType.new(1, 'Country').freeze + STATE_OR_PROVINCE = IssuerType.new(2, 'StateProvince').freeze + TRIBAL = IssuerType.new(3, 'Tribal').freeze + MUNICIPALITY = IssuerType.new(4, 'Municipality').freeze + BUSINESS = IssuerType.new(5, 'Business').freeze + OTHER = IssuerType.new(6, 'Other').freeze + + ALL = [ + UNKNOWN, + COUNTRY, + STATE_OR_PROVINCE, + TRIBAL, + MUNICIPALITY, + BUSINESS, + OTHER, + ].freeze + + BY_CODE = ALL.index_by(&:code).freeze + + def self.from_int(code) + BY_CODE[code] + end + end + end +end diff --git a/app/services/doc_auth/response.rb b/app/services/doc_auth/response.rb index 994f0b3b229..2ff4cd15a15 100644 --- a/app/services/doc_auth/response.rb +++ b/app/services/doc_auth/response.rb @@ -34,20 +34,20 @@ def initialize( @selfie_quality_good = selfie_quality_good end - def merge(other) - Response.new( - success: success? && other.success?, - errors: errors.merge(other.errors), - exception: exception || other.exception, - extra: extra.merge(other.extra), - pii_from_doc: pii_from_doc.merge(other.pii_from_doc), - attention_with_barcode: attention_with_barcode? || other.attention_with_barcode?, - doc_type_supported: doc_type_supported? || other.doc_type_supported?, - selfie_status: selfie_status, - selfie_live: selfie_live?, - selfie_quality_good: selfie_quality_good?, - ) - end + # def merge(other) + # Response.new( + # success: success? && other.success?, + # errors: errors.merge(other.errors), + # exception: exception || other.exception, + # extra: extra.merge(other.extra), + # pii_from_doc: pii_from_doc.merge(other.pii_from_doc), + # attention_with_barcode: attention_with_barcode? || other.attention_with_barcode?, + # doc_type_supported: doc_type_supported? || other.doc_type_supported?, + # selfie_status: selfie_status, + # selfie_live: selfie_live?, + # selfie_quality_good: selfie_quality_good?, + # ) + # end def success? @success diff --git a/app/services/doc_auth/result_codes.rb b/app/services/doc_auth/result_codes.rb index a7f9350219f..b24e8332f52 100644 --- a/app/services/doc_auth/result_codes.rb +++ b/app/services/doc_auth/result_codes.rb @@ -1,36 +1,38 @@ module DocAuth - module ResultCodes - ResultCode = Struct.new(:code, :name, :billed) do - alias_method :billed?, :billed - end + module LexisNexis + module ResultCodes + ResultCode = Struct.new(:code, :name, :billed) do + alias_method :billed?, :billed + end - # The authentication test results are unknown. We are not billed for these - UNKNOWN = ResultCode.new(0, 'Unknown', false).freeze - # The authentication test passed. - PASSED = ResultCode.new(1, 'Passed', true).freeze - # The authentication test failed. - FAILED = ResultCode.new(2, 'Failed', true).freeze - # The authentication test was skipped (was not run). - SKIPPED = ResultCode.new(3, 'Skipped', true).freeze - # The authentication test was inconclusive and further investigation is warranted. - CAUTION = ResultCode.new(4, 'Caution', true).freeze - # The authentication test results requires user attention. - ATTENTION = ResultCode.new(5, 'Attention', true).freeze + # The authentication test results are unknown. We are not billed for these + UNKNOWN = ResultCode.new(0, 'Unknown', false).freeze + # The authentication test passed. + PASSED = ResultCode.new(1, 'Passed', true).freeze + # The authentication test failed. + FAILED = ResultCode.new(2, 'Failed', true).freeze + # The authentication test was skipped (was not run). + SKIPPED = ResultCode.new(3, 'Skipped', true).freeze + # The authentication test was inconclusive and further investigation is warranted. + CAUTION = ResultCode.new(4, 'Caution', true).freeze + # The authentication test results requires user attention. + ATTENTION = ResultCode.new(5, 'Attention', true).freeze - ALL = [ - UNKNOWN, - PASSED, - FAILED, - SKIPPED, - CAUTION, - ATTENTION, - ].freeze + ALL = [ + UNKNOWN, + PASSED, + FAILED, + SKIPPED, + CAUTION, + ATTENTION, + ].freeze - BY_CODE = ALL.index_by(&:code).freeze + BY_CODE = ALL.index_by(&:code).freeze - # @return [ResultCode] - def self.from_int(code) - BY_CODE[code] + # @return [ResultCode] + def self.from_int(code) + BY_CODE[code] + end end end end diff --git a/spec/services/doc_auth/issuer_types_spec.rb b/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb similarity index 88% rename from spec/services/doc_auth/issuer_types_spec.rb rename to spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb index d414ab96272..8108aafd072 100644 --- a/spec/services/doc_auth/issuer_types_spec.rb +++ b/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe DocAuth::IssuerTypes do +RSpec.describe DocAuth::LexisNexis::IssuerTypes do describe '.from_int' do it 'is a result code for the int' do issuer_type = DocAuth::IssuerTypes.from_int(1) diff --git a/spec/services/doc_auth/result_codes_spec.rb b/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb similarity index 89% rename from spec/services/doc_auth/result_codes_spec.rb rename to spec/services/doc_auth/lexis_nexis/result_codes_spec.rb index 66f0fcc4a4c..43bd3894f6e 100644 --- a/spec/services/doc_auth/result_codes_spec.rb +++ b/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb @@ -1,6 +1,6 @@ require 'rails_helper' -RSpec.describe DocAuth::ResultCodes do +RSpec.describe DocAuth::LexisNexis::ResultCodes do describe '.from_int' do it 'is a result code for the int' do result_code = DocAuth::ResultCodes.from_int(1) From 7bc1dc9d3ed8265522bc6e0f5a08c46ee5dbc35a Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Mon, 4 Mar 2024 13:18:08 -0500 Subject: [PATCH 7/9] move ResultCodes and IssuerTypes into LexisNexis module --- app/services/doc_auth/{ => lexis_nexis}/result_codes.rb | 0 spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb | 6 +++--- spec/services/doc_auth/lexis_nexis/result_codes_spec.rb | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) rename app/services/doc_auth/{ => lexis_nexis}/result_codes.rb (100%) diff --git a/app/services/doc_auth/result_codes.rb b/app/services/doc_auth/lexis_nexis/result_codes.rb similarity index 100% rename from app/services/doc_auth/result_codes.rb rename to app/services/doc_auth/lexis_nexis/result_codes.rb diff --git a/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb b/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb index 8108aafd072..23b02fd21a5 100644 --- a/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb +++ b/spec/services/doc_auth/lexis_nexis/issuer_types_spec.rb @@ -3,12 +3,12 @@ RSpec.describe DocAuth::LexisNexis::IssuerTypes do describe '.from_int' do it 'is a result code for the int' do - issuer_type = DocAuth::IssuerTypes.from_int(1) - expect(issuer_type).to be_a(DocAuth::IssuerTypes::IssuerType) + issuer_type = DocAuth::LexisNexis::IssuerTypes.from_int(1) + expect(issuer_type).to be_a(DocAuth::LexisNexis::IssuerTypes::IssuerType) end it 'is nil when there is no matching code' do - issuer_type = DocAuth::IssuerTypes.from_int(999) + issuer_type = DocAuth::LexisNexis::IssuerTypes.from_int(999) expect(issuer_type).to be_nil end end diff --git a/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb b/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb index 43bd3894f6e..9757e959f9f 100644 --- a/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb +++ b/spec/services/doc_auth/lexis_nexis/result_codes_spec.rb @@ -3,13 +3,13 @@ RSpec.describe DocAuth::LexisNexis::ResultCodes do describe '.from_int' do it 'is a result code for the int' do - result_code = DocAuth::ResultCodes.from_int(1) - expect(result_code).to be_a(DocAuth::ResultCodes::ResultCode) + result_code = DocAuth::LexisNexis::ResultCodes.from_int(1) + expect(result_code).to be_a(DocAuth::LexisNexis::ResultCodes::ResultCode) expect(result_code.billed?).to eq(true) end it 'is nil when there is no matching code' do - result_code = DocAuth::ResultCodes.from_int(999) + result_code = DocAuth::LexisNexis::ResultCodes.from_int(999) expect(result_code).to be_nil end end From b95f5c1ce584e6a38fd964f235c036a5b3fa83b7 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Mon, 4 Mar 2024 13:39:08 -0500 Subject: [PATCH 8/9] fix .gitignore --- .gitignore | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 10e1f2f207c..602124f201d 100644 --- a/.gitignore +++ b/.gitignore @@ -98,6 +98,4 @@ saml_*.key **/node_modules yarn-debug.log* yarn-error.log* -.yarn-integrity - -11892Notes.txt +.yarn-integrity \ No newline at end of file From a3e23e84c651e083cd50228b8672a2c42c2b24b2 Mon Sep 17 00:00:00 2001 From: Eileen McFarland Date: Mon, 4 Mar 2024 14:08:30 -0500 Subject: [PATCH 9/9] fix namespacing for ResultCodes and IssuerTypes --- .../image_upload_response_presenter.rb | 2 +- .../doc_auth/classification_concern.rb | 4 +-- app/services/doc_auth/error_generator.rb | 6 ++-- app/services/doc_auth/mock/result_response.rb | 4 +-- app/services/doc_auth/response.rb | 28 +++++++++---------- .../doc_auth/mock/result_response_spec.rb | 8 +++--- 6 files changed, 27 insertions(+), 25 deletions(-) diff --git a/app/presenters/image_upload_response_presenter.rb b/app/presenters/image_upload_response_presenter.rb index df63b5fbf1f..dc18ba68c3c 100644 --- a/app/presenters/image_upload_response_presenter.rb +++ b/app/presenters/image_upload_response_presenter.rb @@ -66,7 +66,7 @@ def url_options private def doc_auth_result_failed? - @form_response.to_h[:doc_auth_result] == DocAuth::ResultCodes::FAILED.name + @form_response.to_h[:doc_auth_result] == DocAuth::LexisNexis::ResultCodes::FAILED.name end def show_hints? diff --git a/app/services/doc_auth/classification_concern.rb b/app/services/doc_auth/classification_concern.rb index e8e8d724a6a..e7b6c83c791 100644 --- a/app/services/doc_auth/classification_concern.rb +++ b/app/services/doc_auth/classification_concern.rb @@ -39,8 +39,8 @@ def doc_issuing_country_ok?(classification_info, doc_side) def doc_issuer_type_ok?(classification_info, doc_side) side_issuer_type = classification_info&.with_indifferent_access&.dig(doc_side, :IssuerType) - side_issuer_type == DocAuth::IssuerTypes::STATE_OR_PROVINCE.name || - side_issuer_type == DocAuth::IssuerTypes::UNKNOWN.name || + side_issuer_type == DocAuth::LexisNexis::IssuerTypes::STATE_OR_PROVINCE.name || + side_issuer_type == DocAuth::LexisNexis::IssuerTypes::UNKNOWN.name || !side_issuer_type.present? end diff --git a/app/services/doc_auth/error_generator.rb b/app/services/doc_auth/error_generator.rb index dd84a810254..8fc3522de07 100644 --- a/app/services/doc_auth/error_generator.rb +++ b/app/services/doc_auth/error_generator.rb @@ -16,6 +16,9 @@ def initialize(config) SELFIE = :selfie GENERAL = :general + ACCEPTED_ISSUER_TYPES = [DocAuth::LexisNexis::IssuerTypes::STATE_OR_PROVINCE.name, + DocAuth::LexisNexis::IssuerTypes::UNKNOWN.name] + ERROR_KEYS = [ ID, FRONT, @@ -147,8 +150,7 @@ def get_id_type_errors(classification_info) side_class == 'Unknown' country_ok = !side_country.present? || supported_country_codes.include?(side_country) issuer_type_ok = !side_issuer_type.present? || - side_issuer_type == DocAuth::IssuerTypes::STATE_OR_PROVINCE.name || - side_issuer_type == DocAuth::IssuerTypes::UNKNOWN.name + ACCEPTED_ISSUER_TYPES.include?(side_issuer_type) both_side_ok &&= issuer_type_ok && side_ok && country_ok error_result.add_side(side.downcase.to_sym) unless side_ok && issuer_type_ok && country_ok end diff --git a/app/services/doc_auth/mock/result_response.rb b/app/services/doc_auth/mock/result_response.rb index d1216c45602..591bada941e 100644 --- a/app/services/doc_auth/mock/result_response.rb +++ b/app/services/doc_auth/mock/result_response.rb @@ -156,9 +156,9 @@ def classification_info def doc_auth_result_from_success if success? - DocAuth::ResultCodes::PASSED.name + DocAuth::LexisNexis::ResultCodes::PASSED.name else - DocAuth::ResultCodes::CAUTION.name + DocAuth::LexisNexis::ResultCodes::CAUTION.name end end diff --git a/app/services/doc_auth/response.rb b/app/services/doc_auth/response.rb index 2ff4cd15a15..994f0b3b229 100644 --- a/app/services/doc_auth/response.rb +++ b/app/services/doc_auth/response.rb @@ -34,20 +34,20 @@ def initialize( @selfie_quality_good = selfie_quality_good end - # def merge(other) - # Response.new( - # success: success? && other.success?, - # errors: errors.merge(other.errors), - # exception: exception || other.exception, - # extra: extra.merge(other.extra), - # pii_from_doc: pii_from_doc.merge(other.pii_from_doc), - # attention_with_barcode: attention_with_barcode? || other.attention_with_barcode?, - # doc_type_supported: doc_type_supported? || other.doc_type_supported?, - # selfie_status: selfie_status, - # selfie_live: selfie_live?, - # selfie_quality_good: selfie_quality_good?, - # ) - # end + def merge(other) + Response.new( + success: success? && other.success?, + errors: errors.merge(other.errors), + exception: exception || other.exception, + extra: extra.merge(other.extra), + pii_from_doc: pii_from_doc.merge(other.pii_from_doc), + attention_with_barcode: attention_with_barcode? || other.attention_with_barcode?, + doc_type_supported: doc_type_supported? || other.doc_type_supported?, + selfie_status: selfie_status, + selfie_live: selfie_live?, + selfie_quality_good: selfie_quality_good?, + ) + end def success? @success diff --git a/spec/services/doc_auth/mock/result_response_spec.rb b/spec/services/doc_auth/mock/result_response_spec.rb index 10554f4c327..c2a28c388b3 100644 --- a/spec/services/doc_auth/mock/result_response_spec.rb +++ b/spec/services/doc_auth/mock/result_response_spec.rb @@ -300,7 +300,7 @@ ) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::ResultCodes::PASSED.name, + doc_auth_result: DocAuth::LexisNexis::ResultCodes::PASSED.name, billed: true, classification_info: {}, workflow: 'test_non_liveness_workflow', @@ -331,7 +331,7 @@ expect(response.pii_from_doc).to eq({}) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::ResultCodes::CAUTION.name, + doc_auth_result: DocAuth::LexisNexis::ResultCodes::CAUTION.name, billed: true, classification_info: {}, liveness_checking_required: false, @@ -358,7 +358,7 @@ expect(response.pii_from_doc).to eq({}) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::ResultCodes::FAILED.name, + doc_auth_result: DocAuth::LexisNexis::ResultCodes::FAILED.name, billed: true, classification_info: {}, liveness_checking_required: false, @@ -406,7 +406,7 @@ ) expect(response.attention_with_barcode?).to eq(false) expect(response.extra).to eq( - doc_auth_result: DocAuth::ResultCodes::PASSED.name, + doc_auth_result: DocAuth::LexisNexis::ResultCodes::PASSED.name, billed: true, classification_info: {}, liveness_checking_required: false,