mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 17:32:31 -05:00
test authenticate post inbox works
This commit is contained in:
parent
dda2c9ab1c
commit
0967574d4d
7 changed files with 232 additions and 52 deletions
|
|
@ -105,6 +105,8 @@ func (f *Federator) PostInboxRequestBodyHook(ctx context.Context, r *http.Reques
|
|||
}
|
||||
l.Tracef("parsed username %s from %s", username, r.URL.String())
|
||||
|
||||
l.Tracef("signature: %s", r.Header.Get("Signature"))
|
||||
|
||||
ctxWithUsername := context.WithValue(ctx, util.APUsernameKey, username)
|
||||
ctxWithActivity := context.WithValue(ctxWithUsername, util.APActivityKey, activity)
|
||||
return ctxWithActivity, nil
|
||||
|
|
@ -148,7 +150,15 @@ func (f *Federator) AuthenticatePostInbox(ctx context.Context, w http.ResponseWr
|
|||
}
|
||||
l.Tracef("parsed username %s from %s", username, r.URL.String())
|
||||
|
||||
return validateInboundFederationRequest(ctx, r, f.db, username, f.transportController)
|
||||
newContext, authed, err := validateInboundFederationRequest(ctx, r, f.db, username, f.transportController)
|
||||
|
||||
if err != nil {
|
||||
l.Debug(err)
|
||||
}
|
||||
|
||||
return newContext, authed, err
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Blocked should determine whether to permit a set of actors given by
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue