Skip to content

Commit

Permalink
did:web time
Browse files Browse the repository at this point in the history
mmattbtw committed Dec 14, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c4575ea commit 6ffd75e
Showing 5 changed files with 53 additions and 24 deletions.
1 change: 1 addition & 0 deletions .astro/integrations/_inox-tools_astro-when/types.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@inox-tools/astro-when';
2 changes: 1 addition & 1 deletion .astro/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"_variables": {
"lastUpdateCheck": 1728577502395
"lastUpdateCheck": 1734161547903
}
}
1 change: 1 addition & 0 deletions .astro/types.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="astro/client" />
/// <reference path="integrations/_inox-tools_astro-when/types.d.ts" />
29 changes: 29 additions & 0 deletions src/pages/.well-known/did.json.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { APIRoute } from "astro";
export const prerender = true;

export const GET: APIRoute = async function GET() {
return Response.json({
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/multikey/v1",
"https://w3id.org/security/suites/secp256k1-2019/v1",
],
id: "did:web:mmatt.net",
alsoKnownAs: ["at://web.mmatt.net"],
verificationMethod: [
{
id: "did:web:mmatt.net#atproto",
type: "Multikey",
controller: "did:web:mmatt.net",
publicKeyMultibase: "zQ3shvN4FeNxNyzbz5db2p5gb54EyQA8jJNxzhW3C7vezJw2Z",
},
],
service: [
{
id: "#atproto_pds",
type: "AtprotoPersonalDataServer",
serviceEndpoint: "https://pds.mmatt.net",
},
],
});
};
44 changes: 21 additions & 23 deletions src/pages/.well-known/webfinger.ts
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
import type { APIRoute } from "astro";
export const prerender = true;

export const get: APIRoute = async function get() {
return {
body: JSON.stringify({
subject: "acct:matt@social.lol",
aliases: ["https://social.lol/@matt", "https://social.lol/users/matt"],
links: [
{
rel: "http://webfinger.net/rel/profile-page",
type: "text/html",
href: "https://social.lol/@matt",
},
{
rel: "self",
type: "application/activity+json",
href: "https://social.lol/users/matt",
},
{
rel: "http://ostatus.org/schema/1.0/subscribe",
template: "https://social.lol/authorize_interaction?uri={uri}",
},
],
}),
};
export const GET: APIRoute = async function GET() {
return Response.json({
subject: "acct:matt@social.lol",
aliases: ["https://social.lol/@matt", "https://social.lol/users/matt"],
links: [
{
rel: "http://webfinger.net/rel/profile-page",
type: "text/html",
href: "https://social.lol/@matt",
},
{
rel: "self",
type: "application/activity+json",
href: "https://social.lol/users/matt",
},
{
rel: "http://ostatus.org/schema/1.0/subscribe",
template: "https://social.lol/authorize_interaction?uri={uri}",
},
],
});
};

0 comments on commit 6ffd75e

Please sign in to comment.