activitypub: implement the ReqSignature middleware

Signed-off-by: Loïc Dachary <loic@dachary.org>
This commit is contained in:
Loïc Dachary
2022-03-18 17:34:09 -05:00
committed by Anthony Wang
parent 15c1f6218c
commit 97fedf2616
8 changed files with 293 additions and 62 deletions
+1
View File
@@ -602,6 +602,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
m.Group("/user/{username}", func() {
m.Get("", activitypub.Person)
})
m.Post("/user/{username}/inbox", activitypub.ReqSignature(), activitypub.PersonInbox)
})
}
m.Get("/signing-key.gpg", misc.SigningKey)