Authn: Add separate context for session tagging (#63561)

add context
This commit is contained in:
Jo 2023-02-22 13:31:08 +00:00 committed by GitHub
parent c72d18f5e6
commit 635a456fa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}()

View File

@ -243,7 +243,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)
}
}()