Class: Yoti::Anchor
- Inherits:
-
Object
- Object
- Yoti::Anchor
- Defined in:
- lib/yoti/data_type/anchor.rb
Overview
Encapsulates attribute anchor
Instance Attribute Summary collapse
-
#origin_server_certs ⇒ Array<OpenSSL::X509::Certificate>
readonly
Certificate chain generated when this Anchor was created (attribute value was sourced or verified).
-
#signed_time_stamp ⇒ Yoti::SignedTimeStamp
readonly
Timestamp applied at the time of Anchor creation.
-
#sub_type ⇒ String
readonly
SubType is an indicator of any specific processing method, or subcategory, pertaining to an artifact.
-
#type ⇒ String
readonly
Gets the type of the given anchor.
-
#value ⇒ String
readonly
Gets the value of the given anchor.
Instance Method Summary collapse
-
#initialize(value, sub_type, signed_time_stamp, origin_server_certs, type = nil) ⇒ Anchor
constructor
A new instance of Anchor.
Constructor Details
#initialize(value, sub_type, signed_time_stamp, origin_server_certs, type = nil) ⇒ Anchor
Returns a new instance of Anchor.
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_certs ⇒ Array<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.
43 44 45 |
# File 'lib/yoti/data_type/anchor.rb', line 43 def origin_server_certs @origin_server_certs end |
#signed_time_stamp ⇒ Yoti::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_type ⇒ String (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”.
28 29 30 |
# File 'lib/yoti/data_type/anchor.rb', line 28 def sub_type @sub_type end |
#type ⇒ String (readonly)
Gets the type of the given anchor.
50 51 52 |
# File 'lib/yoti/data_type/anchor.rb', line 50 def type @type end |
#value ⇒ String (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”.
16 17 18 |
# File 'lib/yoti/data_type/anchor.rb', line 16 def value @value end |