implement auth and a simple admin-follows whitelist
Some checks failed
Go / build (push) Has been cancelled

This commit is contained in:
2025-09-07 19:08:29 +01:00
parent f5a8c094e4
commit 5edb7a3b09
27 changed files with 458 additions and 117 deletions

View File

@@ -12,8 +12,8 @@ import (
"lol.mleku.dev/chk"
"lol.mleku.dev/errorf"
"lol.mleku.dev/log"
"utils.orly/units"
"utils.orly/constraints"
"utils.orly/units"
)
// L is the label associated with this type of codec.Envelope.
@@ -55,7 +55,7 @@ func (en *Challenge) Label() string { return L }
func (en *Challenge) Write(w io.Writer) (err error) {
var b []byte
b = en.Marshal(b)
log.T.F("writing out challenge envelope: '%s'", b)
log.D.F("writing out challenge envelope: '%s'", b)
_, err = w.Write(b)
return
}

View File

@@ -12,13 +12,15 @@ import (
"lol.mleku.dev/chk"
"lol.mleku.dev/errorf"
"utils.orly/bufpool"
"utils.orly/units"
"utils.orly/constraints"
"utils.orly/units"
)
// L is the label associated with this type of codec.Envelope.
const L = "EVENT"
type I interface{ Id() []byte }
// Submission is a request from a client for a realy to store an event.
type Submission struct {
*event.E

View File

@@ -19,7 +19,7 @@ func TestMarshalUnmarshal(t *testing.T) {
t.Fatal(err)
}
s := utils.NewSubscription(i)
req := NewFrom(s, f)
req := NewFrom(s, &f)
rb = req.Marshal(rb)
rb1 = append(rb1, rb...)
var rem []byte