Constructor
# new Claim(uriopt, fingerprintopt)
Initialize a Claim object
Name | Type | Attributes | Description |
---|---|---|---|
uri |
string | object |
<optional> |
The URI of the identity claim or a JSONified Claim instance |
fingerprint |
string |
<optional> |
The fingerprint of the OpenPGP key |
Properties
Name | Type | Description |
---|---|---|
uri |
string | The claim's URI |
fingerprint |
string | The fingerprint to verify the claim against |
status |
string | The current status of the claim |
matches |
Array.<object> | The claim definitions matched against the URI |
verification |
object | The result of the verification process |
const claim = doip.Claim();
const claim = doip.Claim('dns:domain.tld?type=TXT');
const claim = doip.Claim('dns:domain.tld?type=TXT', '123abc123abc');
const claimAlt = doip.Claim(JSON.stringify(claim));
Methods
# isAmbiguous() → {boolean}
Determine the ambiguity of the claim. A claim is only unambiguous if any of the candidates is unambiguous. An ambiguous claim should never be displayed in an user interface when its result is negative.
- Type
- boolean
# match()
Match the claim's URI to candidate definitions
# toJSON() → {object}
Get a JSON representation of the Claim object. Useful when transferring data between instances/machines.
- Type
- object
# (async) verify(optsopt)
Verify the claim. The proof for each candidate is sequentially fetched and checked for the fingerprint. The verification stops when either a positive result was obtained, or an unambiguous claim definition was processed regardless of the result.
Name | Type | Attributes | Description |
---|---|---|---|
opts |
object |
<optional> |
Options for proxy, fetchers |