[v9.4.x] Authn: Add separate context for session tagging (#63571)
Authn: Add separate context for session tagging (#63561)
add context
(cherry picked from commit 635a456fa4)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
This commit is contained in:
committed by
GitHub
parent
8aaca53a32
commit
8e4fa99ec7
@@ -46,7 +46,7 @@ func (a *Anonymous) Authenticate(ctx context.Context, r *authn.Request) (*authn.
|
||||
a.log.Warn("tag anon session panic", "err", err)
|
||||
}
|
||||
}()
|
||||
if err := a.anonSessionService.TagSession(ctx, r.HTTPRequest); err != nil {
|
||||
if err := a.anonSessionService.TagSession(context.Background(), r.HTTPRequest); err != nil {
|
||||
a.log.Warn("Failed to tag anonymous session", "error", err)
|
||||
}
|
||||
}()
|
||||
|
||||
@@ -247,7 +247,7 @@ func (h *ContextHandler) initContextWithAnonymousUser(reqContext *contextmodel.R
|
||||
reqContext.Logger.Warn("tag anon session panic", "err", err)
|
||||
}
|
||||
}()
|
||||
if err := h.anonSessionService.TagSession(reqContext.Req.Context(), reqContext.Req); err != nil {
|
||||
if err := h.anonSessionService.TagSession(context.Background(), reqContext.Req); err != nil {
|
||||
reqContext.Logger.Warn("Failed to tag anonymous session", "error", err)
|
||||
}
|
||||
}()
|
||||
|
||||
Reference in New Issue
Block a user