[feature] Refactor tokens, allow multiple app redirect_uris

This commit is contained in:
tobi 2025-03-03 11:45:45 +01:00
commit 3b1b842890
77 changed files with 860 additions and 554 deletions

View file

@ -50,7 +50,6 @@ type WebfingerStandardTestSuite struct {
// standard suite models
testTokens map[string]*gtsmodel.Token
testClients map[string]*gtsmodel.Client
testApplications map[string]*gtsmodel.Application
testUsers map[string]*gtsmodel.User
testAccounts map[string]*gtsmodel.Account
@ -63,7 +62,6 @@ type WebfingerStandardTestSuite struct {
func (suite *WebfingerStandardTestSuite) SetupSuite() {
suite.testTokens = testrig.NewTestTokens()
suite.testClients = testrig.NewTestClients()
suite.testApplications = testrig.NewTestApplications()
suite.testUsers = testrig.NewTestUsers()
suite.testAccounts = testrig.NewTestAccounts()
@ -102,7 +100,7 @@ func (suite *WebfingerStandardTestSuite) SetupTest() {
suite.mediaManager,
)
suite.webfingerModule = webfinger.New(suite.processor)
suite.oauthServer = testrig.NewTestOauthServer(suite.db)
suite.oauthServer = testrig.NewTestOauthServer(&suite.state)
testrig.StandardDBSetup(suite.db, suite.testAccounts)
testrig.StandardStorageSetup(suite.storage, "../../../../testrig/media")
}

View file

@ -94,7 +94,7 @@ func (suite *WebfingerGetTestSuite) funkifyAccountDomain(host string, accountDom
subscriptions.New(&suite.state, suite.federator.TransportController(), suite.tc),
suite.tc,
suite.federator,
testrig.NewTestOauthServer(suite.db),
testrig.NewTestOauthServer(&suite.state),
testrig.NewTestMediaManager(&suite.state),
&suite.state,
suite.emailSender,