feat: Add markers to service provider configs

This commit is contained in:
Yarmo Mackenbach 2023-03-29 13:05:56 +02:00
parent 870a544550
commit 334446cee2
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1
23 changed files with 70 additions and 1 deletions

View file

@ -32,6 +32,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -29,6 +29,7 @@ const processURI = (uri) => {
regularExpression: reURI, regularExpression: reURI,
isAmbiguous: true isAmbiguous: true
}, },
markers: [],
profile: { profile: {
display: `${match[2]}@${match[1]}`, display: `${match[2]}@${match[1]}`,
uri: uri, uri: uri,

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://${match[1]}`, uri: `https://${match[1]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: null, uri: null,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`, uri: `https://${match[1]}/${match[2]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,38 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`, uri: `https://${match[1]}/${match[2]}`,
qr: null qr: null
}, },
markers: [
{
request: {
fetcher: E.Fetcher.HTTP,
access: E.ProofAccess.NOCORS,
format: E.ProofFormat.JSON,
data: {
url: `https://${match[1]}/api/v1/version`,
format: E.ProofFormat.JSON
}
},
test: {
type: E.MarkerTestType.HTTP_ENDPOINT_MUST_EXIST,
inverse: false
}
},
{
request: {
fetcher: E.Fetcher.HTTP,
access: E.ProofAccess.NOCORS,
format: E.ProofFormat.JSON,
data: {
url: `https://${match[1]}/api/forgejo/v1/version`,
format: E.ProofFormat.JSON
}
},
test: {
type: E.MarkerTestType.HTTP_ENDPOINT_MUST_EXIST,
inverse: false
}
}
],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,23 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`, uri: `https://${match[1]}/${match[2]}`,
qr: null qr: null
}, },
markers: [
{
request: {
fetcher: E.Fetcher.HTTP,
access: E.ProofAccess.NOCORS,
format: E.ProofFormat.JSON,
data: {
url: `https://${match[1]}/api/v1/version`,
format: E.ProofFormat.JSON
}
},
test: {
type: E.MarkerTestType.HTTP_ENDPOINT_MUST_EXIST,
inverse: false
}
}
],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://github.com/${match[1]}`, uri: `https://github.com/${match[1]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`, uri: `https://${match[1]}/${match[2]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`, uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`,
request: { request: {

View file

@ -27,7 +27,7 @@ const data = {
hackernews: require('./hackernews'), hackernews: require('./hackernews'),
lobsters: require('./lobsters'), lobsters: require('./lobsters'),
forem: require('./forem'), forem: require('./forem'),
// forgejo: require('./forgejo'), forgejo: require('./forgejo'),
gitea: require('./gitea'), gitea: require('./gitea'),
gitlab: require('./gitlab'), gitlab: require('./gitlab'),
github: require('./github'), github: require('./github'),

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: null, uri: null,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `https://keybase.io/_/api/1.0/user/lookup.json?username=${match[1]}`, uri: `https://keybase.io/_/api/1.0/user/lookup.json?username=${match[1]}`,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `https://lichess.org/api/user/${match[1]}`, uri: `https://lichess.org/api/user/${match[1]}`,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `https://lobste.rs/u/${match[1]}.json`, uri: `https://lobste.rs/u/${match[1]}.json`,
request: { request: {

View file

@ -50,6 +50,7 @@ const processURI = (uri) => {
uri: profileUrl, uri: profileUrl,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: eventUrl, uri: eventUrl,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `${uri}/api/config`, uri: `${uri}/api/config`,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://www.reddit.com/user/${match[1]}`, uri: `https://www.reddit.com/user/${match[1]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -36,6 +36,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: `https://${domain}.com/users/${id}?tab=profile`, uri: `https://${domain}.com/users/${id}?tab=profile`,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://t.me/${match[1]}`, uri: `https://t.me/${match[1]}`,
qr: `https://t.me/${match[1]}` qr: `https://t.me/${match[1]}`
}, },
markers: [],
proof: { proof: {
uri: `https://t.me/${match[2]}`, uri: `https://t.me/${match[2]}`,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: `https://twitter.com/${match[1]}`, uri: `https://twitter.com/${match[1]}`,
qr: null qr: null
}, },
markers: [],
proof: { proof: {
uri: uri, uri: uri,
request: { request: {

View file

@ -34,6 +34,7 @@ const processURI = (uri) => {
uri: uri, uri: uri,
qr: uri qr: uri
}, },
markers: [],
proof: { proof: {
uri: null, uri: null,
request: { request: {