feat: webfinger auth delegation. add webfinger-cli

This commit is contained in:
Jon Lundy
2023-01-15 17:00:25 -07:00
parent 2fb3fae61f
commit 7d78cfb10a
16 changed files with 759 additions and 56 deletions

View File

@@ -3,10 +3,12 @@ package main
import (
"context"
"fmt"
"strings"
"github.com/sour-is/ev"
"github.com/sour-is/ev/app/webfinger"
"github.com/sour-is/ev/internal/lg"
"github.com/sour-is/ev/pkg/env"
"github.com/sour-is/ev/pkg/service"
"github.com/sour-is/ev/pkg/slice"
)
@@ -21,7 +23,12 @@ var _ = apps.Register(50, func(ctx context.Context, svc *service.Harness) error
return fmt.Errorf("*es.EventStore not found in services")
}
wf, err := webfinger.New(ctx, eventstore)
wf, err := webfinger.New(
ctx,
eventstore,
webfinger.WithHostnames(
strings.Fields(env.Default("WEBFINGER_DOMAINS", "sour.is")),
))
if err != nil {
span.RecordError(err)
return err

View File

@@ -15,7 +15,9 @@ import (
)
var _ = apps.Register(20, func(ctx context.Context, svc *service.Harness) error {
s := &http.Server{}
s := &http.Server{
}
svc.Add(s)
mux := mux.New()