Sha256: fa30d2a3c48cce014b8d2e8167115d239ef833d285541848af53b34b20c9d694

Contents?: true

Size: 1.76 KB

Versions: 11

Compression:

Stored size: 1.76 KB

Contents

module Yoti
  # Encapsulates attribute anchor
  class Anchor
    #
    # Gets the value of the given anchor.
    #
    # Among possible options for SOURCE are "USER_PROVIDED", "PASSPORT",
    # "DRIVING_LICENCE", "NATIONAL_ID" and "PASSCARD".
    #
    # Among possible options for VERIFIER are "YOTI_ADMIN", "YOTI_IDENTITY",
    # "YOTI_OTP", "PASSPORT_NFC_SIGNATURE", "ISSUING_AUTHORITY" and
    # "ISSUING_AUTHORITY_PKI".
    #
    # @return [String]
    #
    attr_reader :value

    #
    # SubType is an indicator of any specific processing method, or subcategory,
    # pertaining to an artifact.
    #
    # Examples:
    # - For a passport, this would be either "NFC" or "OCR".
    # - For a national ID, this could be "AADHAAR".
    #
    # @return [String]
    #
    attr_reader :sub_type

    #
    # Timestamp applied at the time of Anchor creation.
    #
    # @return [Yoti::SignedTimeStamp]
    #
    attr_reader :signed_time_stamp

    #
    # Certificate chain generated when this Anchor was created (attribute value was
    # sourced or verified). Securely encodes the Anchor type and value.
    #
    # @return [Array<OpenSSL::X509::Certificate>]
    #
    attr_reader :origin_server_certs

    #
    # Gets the type of the given anchor.
    #
    # @return [String]
    #
    attr_reader :type

    #
    # @param [String] value
    # @param [String] sub_type
    # @param [Yoti::SignedTimeStamp] signed_time_stamp
    # @param [Array<OpenSSL::X509::Certificate>] origin_server_certs
    # @param [String] type
    #
    def initialize(value, sub_type, signed_time_stamp, origin_server_certs, type = nil)
      @value = value
      @sub_type = sub_type
      @signed_time_stamp = signed_time_stamp
      @origin_server_certs = origin_server_certs
      @type = type
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
yoti-1.10.0 lib/yoti/data_type/anchor.rb
yoti-1.9.0 lib/yoti/data_type/anchor.rb
yoti-1.8.0 lib/yoti/data_type/anchor.rb
yoti-1.7.1 lib/yoti/data_type/anchor.rb
yoti-1.7.0 lib/yoti/data_type/anchor.rb
yoti-1.6.4 lib/yoti/data_type/anchor.rb
yoti-1.6.3 lib/yoti/data_type/anchor.rb
yoti-1.6.2 lib/yoti/data_type/anchor.rb
yoti-1.6.1 lib/yoti/data_type/anchor.rb
yoti-1.6.0 lib/yoti/data_type/anchor.rb
yoti-1.5.0 lib/yoti/data_type/anchor.rb