summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-03 16:03:36 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-03 15:03:36 +0000
commit1b37944f8b8eccc2afcfb0f603786209a3b7402d (patch)
tree2bc0be27cf0405e16ac3e14efc3b6973eb096b8b /cmd
parentbumps go-ffmpreg to v0.6.6 (#3866) (diff)
downloadgotosocial-1b37944f8b8eccc2afcfb0f603786209a3b7402d.tar.xz
[feature] Refactor tokens, allow multiple app redirect_uris (#3849)
* [feature] Refactor tokens, allow multiple app redirect_uris * move + tweak handlers a bit * return error for unset oauth2.ClientStore funcs * wrap UpdateToken with cache * panic handling * cheeky little time optimization * unlock on error
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gotosocial/action/server/server.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/gotosocial/action/server/server.go b/cmd/gotosocial/action/server/server.go
index dcd30a9b5..3c37c6ff6 100644
--- a/cmd/gotosocial/action/server/server.go
+++ b/cmd/gotosocial/action/server/server.go
@@ -52,6 +52,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/messages"
"github.com/superseriousbusiness/gotosocial/internal/middleware"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
+ "github.com/superseriousbusiness/gotosocial/internal/oauth/handlers"
"github.com/superseriousbusiness/gotosocial/internal/observability"
"github.com/superseriousbusiness/gotosocial/internal/oidc"
"github.com/superseriousbusiness/gotosocial/internal/processing"
@@ -260,7 +261,14 @@ var Start action.GTSAction = func(ctx context.Context) error {
// Build handlers used in later initializations.
mediaManager := media.NewManager(state)
- oauthServer := oauth.New(ctx, dbService)
+ oauthServer := oauth.New(ctx, state,
+ handlers.GetValidateURIHandler(ctx),
+ handlers.GetClientScopeHandler(ctx, state),
+ handlers.GetAuthorizeScopeHandler(),
+ handlers.GetInternalErrorHandler(ctx),
+ handlers.GetResponseErrorHandler(ctx),
+ handlers.GetUserAuthorizationHandler(),
+ )
typeConverter := typeutils.NewConverter(state)
visFilter := visibility.NewFilter(state)
intFilter := interaction.NewFilter(state)