aboutsummaryrefslogtreecommitdiff
path: root/internal/context/auth.go
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-06-11 09:42:17 +0800
committerGitHub <noreply@github.com>2022-06-11 09:42:17 +0800
commitf837ea6346ac720d586eda51ab89c5c71a1f3e65 (patch)
tree678b0bdccee80e65c399e8696cd209c9e902618d /internal/context/auth.go
parent9776bdc9b8b441ebd73c100bfe2aa4e495c233ca (diff)
db: use `context` and go-mockgen for `UsersStore` (#7042)
Diffstat (limited to 'internal/context/auth.go')
-rw-r--r--internal/context/auth.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/context/auth.go b/internal/context/auth.go
index 25625c3d..cba68706 100644
--- a/internal/context/auth.go
+++ b/internal/context/auth.go
@@ -208,7 +208,7 @@ func authenticatedUser(ctx *macaron.Context, sess session.Store) (_ *db.User, is
if len(auths) == 2 && auths[0] == "Basic" {
uname, passwd, _ := tool.BasicAuthDecode(auths[1])
- u, err := db.Users.Authenticate(uname, passwd, -1)
+ u, err := db.Users.Authenticate(ctx.Req.Context(), uname, passwd, -1)
if err != nil {
if !auth.IsErrBadCredentials(err) {
log.Error("Failed to authenticate user: %v", err)