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,
qr: null
},
markers: [],
proof: {
uri: uri,
request: {

View file

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

View file

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

View file

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

View file

@ -34,6 +34,38 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`,
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: {
uri: uri,
request: {

View file

@ -34,6 +34,23 @@ const processURI = (uri) => {
uri: `https://${match[1]}/${match[2]}`,
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: {
uri: uri,
request: {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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