Sha256: 55803cd669210fa0d5e7fb3aae1f3a1290344820fc57852021a30e3823e0e1b2

Contents?: true

Size: 623 Bytes

Versions: 6

Compression:

Stored size: 623 Bytes

Contents

require_relative "base_client"

module PortalConnectors
  class LivenessDetectionClient < BaseClient
    def self.singleton
      @singleton ||= new
    end

    def fetch_verification_by_id(identity_access_key)
      url = "#{host}/challenges/#{identity_access_key}"
      res = Curl::Easy.perform(url) do |c|
        c.timeout = 10
        c.version = Curl::HTTP_1_1
        c.headers["Authorization"] = signature_for(identity_access_key)
        c.headers["Appname"] = PortalConnectors.requester
      end
      [JSON.parse(res.body_str), res.response_code == 200]
    rescue => e
      return_error e
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
portal-connectors-0.58.39xc lib/portal-connectors/liveness_detection_client.rb
portal-connectors-0.58.39xb lib/portal-connectors/liveness_detection_client.rb
portal-connectors-0.58.39xa lib/portal-connectors/liveness_detection_client.rb
portal-connectors-0.58.39fj lib/portal-connectors/liveness_detection_client.rb
portal-connectors-0.58.39fg lib/portal-connectors/liveness_detection_client.rb
portal-connectors-0.58.38xn lib/portal-connectors/liveness_detection_client.rb