move + tweak handlers a bit

This commit is contained in:
tobi 2025-03-03 14:30:23 +01:00
commit 469bd75999
5 changed files with 221 additions and 150 deletions

View file

@ -20,8 +20,8 @@ package testrig
import (
"context"
apiutil "github.com/superseriousbusiness/gotosocial/internal/api/util"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/oauth/handlers"
"github.com/superseriousbusiness/gotosocial/internal/state"
)
@ -31,6 +31,11 @@ func NewTestOauthServer(state *state.State) oauth.Server {
return oauth.New(
ctx,
state,
apiutil.GetClientScopeHandler(ctx, state),
handlers.GetValidateURIHandler(ctx),
handlers.GetClientScopeHandler(ctx, state),
handlers.GetAuthorizeScopeHandler(),
handlers.GetInternalErrorHandler(ctx),
handlers.GetResponseErrorHandler(ctx),
handlers.GetUserAuthorizationHandler(),
)
}