Class: Yoti::Anchor

Inherits:
Object
  • Object
show all
Defined in:
lib/yoti/data_type/anchor.rb

Overview

Encapsulates attribute anchor

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value, sub_type, signed_time_stamp, origin_server_certs, type = nil) ⇒ Anchor

Returns a new instance of Anchor.

Parameters:

  • value (String)
  • sub_type (String)
  • signed_time_stamp (Yoti::SignedTimeStamp)
  • origin_server_certs (Array<OpenSSL::X509::Certificate>)
  • type (String) (defaults to: nil)


59
60
61
62
63
64
65
# File 'lib/yoti/data_type/anchor.rb', line 59

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

Instance Attribute Details

#origin_server_certsArray<OpenSSL::X509::Certificate> (readonly)

Certificate chain generated when this Anchor was created (attribute value was sourced or verified). Securely encodes the Anchor type and value.

Returns:

  • (Array<OpenSSL::X509::Certificate>)


43
44
45
# File 'lib/yoti/data_type/anchor.rb', line 43

def origin_server_certs
  @origin_server_certs
end

#signed_time_stampYoti::SignedTimeStamp (readonly)

Timestamp applied at the time of Anchor creation.



35
36
37
# File 'lib/yoti/data_type/anchor.rb', line 35

def signed_time_stamp
  @signed_time_stamp
end

#sub_typeString (readonly)

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”.

Returns:

  • (String)


28
29
30
# File 'lib/yoti/data_type/anchor.rb', line 28

def sub_type
  @sub_type
end

#typeString (readonly)

Gets the type of the given anchor.

Returns:

  • (String)


50
51
52
# File 'lib/yoti/data_type/anchor.rb', line 50

def type
  @type
end

#valueString (readonly)

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”.

Returns:

  • (String)


16
17
18
# File 'lib/yoti/data_type/anchor.rb', line 16

def value
  @value
end