mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-23 10:26:21 -06:00
[feature] Refactor tokens, allow multiple app redirect_uris
This commit is contained in:
parent
67a2b3650c
commit
3b1b842890
77 changed files with 860 additions and 554 deletions
|
|
@ -20,11 +20,17 @@ package testrig
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/superseriousbusiness/gotosocial/internal/db"
|
||||
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/oauth"
|
||||
"github.com/superseriousbusiness/gotosocial/internal/state"
|
||||
)
|
||||
|
||||
// NewTestOauthServer returns an oauth server with the given db
|
||||
func NewTestOauthServer(db db.DB) oauth.Server {
|
||||
return oauth.New(context.Background(), db)
|
||||
func NewTestOauthServer(state *state.State) oauth.Server {
|
||||
ctx := context.Background()
|
||||
return oauth.New(
|
||||
ctx,
|
||||
state,
|
||||
apiutil.GetClientScopeHandler(ctx, state),
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue