···2233import (
44 "context"
55+ "fmt"
66+ "net/http"
57 "strings"
6879 "github.com/bluesky-social/indigo/atproto/syntax"
···8688func DeletePublication(ctx context.Context, client lexutil.LexClient, repo syntax.AtIdentifier, rkey syntax.RecordKey) error {
8789 return deleteRecord(ctx, client, CollectionPublication, repo, rkey)
8890}
9191+9292+// HandlePublicationVerification returns an [http.Handler] used during the verification of the [Publication].
9393+//
9494+// See [GetPublicationVerificationURI].
9595+func HandlePublicationVerification(repo syntax.AtIdentifier, rkey syntax.RecordKey) http.Handler {
9696+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
9797+ fmt.Fprintf(w, "at://%s/%s/%s", repo, CollectionPublication, rkey)
9898+ })
9999+}
100100+101101+// GetPublicationVerificationURI returns the URI called during the verification of the [Publication].
102102+// Path must be empty if the [Publication] is located at the domain root.
103103+//
104104+// See [HandlePublicationVerification].
105105+func GetPublicationVerificationURI(path string) string {
106106+ return "/.well-known/" + CollectionPublication + path
107107+}