forked from Mirrors/doipjs
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)
|
- uri (string: the URI containing the proof to be by humans and machines)
|
||||||
- fetch (string: see below)
|
- fetch (string: see below)
|
||||||
- useProxy (boolean: should the request be sent using a proxy)
|
- useProxy (boolean: should the request be sent using a proxy)
|
||||||
|
- format (string: [json, text])
|
||||||
- claim (object)
|
- claim (object)
|
||||||
- fingerprint (string: the fingerprint that verifies the claim if found in the proof)
|
- fingerprint (string: the fingerprint that verifies the claim if found in the proof)
|
||||||
- format (string: see below [uri, message, fingerprint])
|
- format (string: see below [uri, message, fingerprint])
|
||||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
||||||
proof: {
|
proof: {
|
||||||
uri: `https://dns.shivering-isles.com/dns-query?name=${match[1]}&type=TXT`,
|
uri: `https://dns.shivering-isles.com/dns-query?name=${match[1]}&type=TXT`,
|
||||||
fetch: null,
|
fetch: null,
|
||||||
useProxy: false
|
useProxy: false,
|
||||||
|
format: 'json'
|
||||||
},
|
},
|
||||||
claim: {
|
claim: {
|
||||||
fingerprint: null,
|
fingerprint: null,
|
||||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
||||||
proof: {
|
proof: {
|
||||||
uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`,
|
uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`,
|
||||||
fetch: null,
|
fetch: null,
|
||||||
useProxy: true
|
useProxy: true,
|
||||||
|
format: 'json'
|
||||||
},
|
},
|
||||||
claim: {
|
claim: {
|
||||||
fingerprint: null,
|
fingerprint: null,
|
||||||
|
|
|
@ -31,7 +31,8 @@ const processURI = (uri, opts) => {
|
||||||
proof: {
|
proof: {
|
||||||
uri: uri,
|
uri: uri,
|
||||||
fetch: `https://mobile.twitter.com/${match[1]}/status/${match[2]}`,
|
fetch: `https://mobile.twitter.com/${match[1]}/status/${match[2]}`,
|
||||||
useProxy: false
|
useProxy: false,
|
||||||
|
format: 'text'
|
||||||
},
|
},
|
||||||
claim: {
|
claim: {
|
||||||
fingerprint: null,
|
fingerprint: null,
|
||||||
|
|
|
@ -33,7 +33,8 @@ const processURI = (uri, opts) => {
|
||||||
? `https://${opts.XMPP_VCARD_SERVER_DOMAIN}/api/vcard/${output.display}/DESC`
|
? `https://${opts.XMPP_VCARD_SERVER_DOMAIN}/api/vcard/${output.display}/DESC`
|
||||||
: null,
|
: null,
|
||||||
fetch: null,
|
fetch: null,
|
||||||
useProxy: false
|
useProxy: false,
|
||||||
|
format: 'json'
|
||||||
},
|
},
|
||||||
claim: {
|
claim: {
|
||||||
fingerprint: null,
|
fingerprint: null,
|
||||||
|
|
Loading…
Reference in a new issue