Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anchor ¶
type Anchor struct {
// contains filtered or unexported fields
}
Anchor is the metadata associated with an attribute. It describes how an attribute has been provided to Yoti (SOURCE Anchor) and how it has been verified (VERIFIER Anchor). If an attribute has only one SOURCE Anchor with the value set to "USER_PROVIDED" and zero VERIFIER Anchors, then the attribute is a self-certified one.
func GetSources ¶
GetSources returns the anchors which identify how and when an attribute value was acquired.
func GetVerifiers ¶
GetVerifiers returns the anchors which identify how and when an attribute value was verified by another provider.
func ParseAnchors ¶
func ParseAnchors(protoAnchors []*yotiprotoattr.Anchor) []*Anchor
ParseAnchors takes a slice of protobuf anchors, parses them, and returns a slice of Yoti SDK Anchors
func (Anchor) OriginServerCerts ¶
func (a Anchor) OriginServerCerts() []*x509.Certificate
OriginServerCerts are the X.509 certificate chain(DER-encoded ASN.1) from the service that assigned the attribute.
The first certificate in the chain holds the public key that can be used to verify the Signature field; any following entries (zero or more) are for intermediate certificate authorities (in order).
The last certificate in the chain must be verified against the Yoti root CA certificate. An extension in the first certificate holds the main artifact type, e.g. “PASSPORT”, which can be retrieved with .Value().
func (Anchor) SignedTimestamp ¶
func (a Anchor) SignedTimestamp() SignedTimestamp
SignedTimestamp is the time at which the signature was created. The message associated with the timestamp is the marshaled form of AttributeSigning (i.e. the same message that is signed in the Signature field). This method returns the SignedTimestamp object, the actual timestamp as a *time.Time can be called with .Timestamp() on the result of this function.
func (Anchor) SubType ¶
SubType is an indicator of any specific processing method, or subcategory, pertaining to an artifact. For example, for a passport, this would be either "NFC" or "OCR".
func (Anchor) Type ¶
Type of the Anchor - most likely either SOURCE or VERIFIER, but it's possible that new Anchor types will be added in future.
type SignedTimestamp ¶
type SignedTimestamp struct {
// contains filtered or unexported fields
}
SignedTimestamp is the object which contains a timestamp
func (SignedTimestamp) Timestamp ¶
func (s SignedTimestamp) Timestamp() *time.Time
Timestamp is a point in time, to the nearest microsecond.
func (SignedTimestamp) Version ¶
func (s SignedTimestamp) Version() int32
Version indicates both the version of the protobuf message in use, as well as the specific hash algorithms.