aboutsummaryrefslogtreecommitdiff
path: root/internal/httputil/httpapi.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/httputil/httpapi.go')
-rw-r--r--internal/httputil/httpapi.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/httputil/httpapi.go b/internal/httputil/httpapi.go
index a35a10d6..d371d172 100644
--- a/internal/httputil/httpapi.go
+++ b/internal/httputil/httpapi.go
@@ -27,9 +27,9 @@ import (
"github.com/gorilla/mux"
"github.com/matrix-org/dendrite/clientapi/auth"
- "github.com/matrix-org/dendrite/clientapi/auth/authtypes"
federationsenderAPI "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/config"
+ userapi "github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/util"
opentracing "github.com/opentracing/opentracing-go"
@@ -48,11 +48,11 @@ type BasicAuth struct {
// MakeAuthAPI turns a util.JSONRequestHandler function into an http.Handler which authenticates the request.
func MakeAuthAPI(
- metricsName string, data auth.Data,
- f func(*http.Request, *authtypes.Device) util.JSONResponse,
+ metricsName string, userAPI userapi.UserInternalAPI,
+ f func(*http.Request, *userapi.Device) util.JSONResponse,
) http.Handler {
h := func(req *http.Request) util.JSONResponse {
- device, err := auth.VerifyUserFromRequest(req, data)
+ device, err := auth.VerifyUserFromRequest(req, userAPI)
if err != nil {
return *err
}