-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
User keypairs and HTTP signatures for ActivityPub federation using go-ap #19133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
go get github.com/go-fed/activity/streams@master go get github.com/go-fed/activity/pub@master go get github.com/go-fed/httpsig@master
Return informations regarding a Person (as defined in ActivityStreams https://www.w3.org/TR/activitystreams-vocabulary/#dfn-person). Refs: #14186 Signed-off-by: Loïc Dachary <[email protected]>
Refs: #14186 Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Loïc Dachary <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Signed-off-by: Anthony Wang <[email protected]>
Gusted
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looking good. Code flow looks good to me, we might want to add some more comments here and there because I'm still scratching my head at some sections of the code, of what's actually doing.
Signed-off-by: Anthony Wang <[email protected]>
That's measurably bigger. Of course it would be nice if go-fed was able to simplify code to reduce the binary size. Possible solution, given the nature of this is to introduce build tags within gitea, such that go-fed won't compile if one doesn't want to use federation. |
Signed-off-by: Anthony Wang <[email protected]>
6543
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at least add it ...
|
Sorry for the force-push: I think it's because https://github.com/Ta180m/gitea is a push mirror of https://gitea.com/Ta180m/gitea and a commit on the GitHub repo was overwritten when gitea.com synchronized the mirror. |
|
to bad ... I was just going to merge this ... |
@6543 I don't think there was anything important overwritten so it should be OK to merge now. |
delvh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only skimmed through it because it seems to get merged soon, but I found a few things:
| // NewClient function | ||
| func NewClient(user *user_model.User, pubID string) (c *Client, err error) { | ||
| if err = containsRequiredHTTPHeaders(http.MethodGet, setting.Federation.GetHeaders); err != nil { | ||
| return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that there is currently a PR that attempts to get rid of naked returns, I think you should convert them.
Everywhere you added them.
|
🚀 |
This implements a few components of the ActivityPub protocol using the go-ap library. This includes an
/activitypuband/activitypub/userendpoint for the API, ActivityPub-specific information in the/.well-known/webfingerendpoint, and middleware for HTTP signatures. It does not do much but it is an essential building block for ActivityPub federation.