Oauth/token (#7)

* add host and protocol options

* some fiddling

* tidying up and comments

* tick off /oauth/token

* tidying a bit

* tidying

* go mod tidy

* allow attaching middleware to server

* add middleware

* more user friendly

* add comments

* comments

* store account + app

* tidying

* lots of restructuring

* lint + tidy
This commit is contained in:
Tobi Smethurst 2021-03-22 22:26:54 +01:00 committed by GitHub
commit aa9ce272dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1346 additions and 977 deletions

View file

@ -30,11 +30,13 @@ import (
"github.com/gotosocial/gotosocial/internal/db"
)
// New returns a go-fed compatible federating actor
func New(db db.DB) pub.FederatingActor {
fa := &API{}
return pub.NewFederatingActor(fa, fa, db, fa)
return pub.NewFederatingActor(fa, fa, db.Federation(), fa)
}
// API implements several go-fed interfaces in one convenient location
type API struct {
}