Chore: Add context to authinfo (#42096)

* Add context to authinfo

* Replace Dispatch with DispatchCtx
This commit is contained in:
idafurjes
2021-11-25 14:22:40 +01:00
committed by GitHub
parent d0c9564e1a
commit ac6867c3bb
13 changed files with 88 additions and 83 deletions
@@ -248,7 +248,7 @@ func (auth *AuthProxy) LoginViaLDAP() (int64, error) {
SignupAllowed: auth.cfg.LDAPAllowSignup,
ExternalUser: extUser,
}
if err := bus.Dispatch(upsert); err != nil {
if err := bus.DispatchCtx(auth.ctx.Req.Context(), upsert); err != nil {
return 0, err
}
@@ -305,7 +305,7 @@ func (auth *AuthProxy) LoginViaHeader() (int64, error) {
ExternalUser: extUser,
}
err := bus.Dispatch(upsert)
err := bus.DispatchCtx(auth.ctx.Req.Context(), upsert)
if err != nil {
return 0, err
}