Add proof.format field to service provider data structure

This commit is contained in:
Yarmo Mackenbach 2020-10-24 17:30:22 +02:00
parent 773ecded18
commit d81bf10070
5 changed files with 9 additions and 4 deletions

View file

@ -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])

View file

@ -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,

View file

@ -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,

View file

@ -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,

View file

@ -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,