From d6ab3ff6a8d3c8813f2699a1b2dcb2cbef4742f3 Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Wed, 27 May 2020 15:37:47 +0200 Subject: [PATCH] Use account uuid extractor middleware from ocis-pkg --- pkg/server/http/server.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/server/http/server.go b/pkg/server/http/server.go index ccad9beb82..36456e7f9b 100644 --- a/pkg/server/http/server.go +++ b/pkg/server/http/server.go @@ -2,6 +2,7 @@ package http import ( "github.com/go-chi/chi" + "github.com/owncloud/ocis-pkg/v2/account" "github.com/owncloud/ocis-pkg/v2/middleware" "github.com/owncloud/ocis-pkg/v2/service/http" "github.com/owncloud/ocis-settings/pkg/assets" @@ -39,6 +40,10 @@ func Server(opts ...Option) http.Service { mux.Use(middleware.Cache) mux.Use(middleware.Cors) mux.Use(middleware.Secure) + mux.Use(middleware.ExtractAccountUUID( + account.Logger(options.Logger), + account.JWTSecret(options.Config.TokenManager.JWTSecret)), + ) mux.Use(middleware.Version( "settings",