mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 14:39:28 -07:00
Add proof.format field to service provider data structure
This commit is contained in:
parent
773ecded18
commit
d81bf10070
5 changed files with 9 additions and 4 deletions
|
@ -19,6 +19,7 @@ The object returned by a service provider consists of:
|
|||
- uri (string: the URI containing the proof to be by humans and machines)
|
||||
- fetch (string: see below)
|
||||
- useProxy (boolean: should the request be sent using a proxy)
|
||||
- format (string: [json, text])
|
||||
- claim (object)
|
||||
- fingerprint (string: the fingerprint that verifies the claim if found in the proof)
|
||||
- format (string: see below [uri, message, fingerprint])
|
||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
|||
proof: {
|
||||
uri: `https://dns.shivering-isles.com/dns-query?name=${match[1]}&type=TXT`,
|
||||
fetch: null,
|
||||
useProxy: false
|
||||
useProxy: false,
|
||||
format: 'json'
|
||||
},
|
||||
claim: {
|
||||
fingerprint: null,
|
||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
|||
proof: {
|
||||
uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`,
|
||||
fetch: null,
|
||||
useProxy: true
|
||||
useProxy: true,
|
||||
format: 'json'
|
||||
},
|
||||
claim: {
|
||||
fingerprint: null,
|
||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
|||
proof: {
|
||||
uri: uri,
|
||||
fetch: `https://mobile.twitter.com/${match[1]}/status/${match[2]}`,
|
||||
useProxy: false
|
||||
useProxy: false,
|
||||
format: 'text'
|
||||
},
|
||||
claim: {
|
||||
fingerprint: null,
|
||||
|
|
|
@ -33,7 +33,8 @@ const processURI = (uri, opts) => {
|
|||
? `https://${opts.XMPP_VCARD_SERVER_DOMAIN}/api/vcard/${output.display}/DESC`
|
||||
: null,
|
||||
fetch: null,
|
||||
useProxy: false
|
||||
useProxy: false,
|
||||
format: 'json'
|
||||
},
|
||||
claim: {
|
||||
fingerprint: null,
|
||||
|
|
Loading…
Reference in a new issue