AuthN: Set LookupTokenErr and fall through in case of error (#61217)

ContextHandler: Set LookupTokenErr and fall through in case of error
during authentication
This commit is contained in:
Karl Persson 2023-01-10 14:36:02 +01:00 committed by GitHub
parent e88687cfa2
commit c5f77b6a46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -489,8 +489,8 @@ func (h *ContextHandler) initContextWithToken(reqContext *models.ReqContext, org
reqContext.Resp.Before(h.deleteInvalidCookieEndOfRequestFunc(reqContext))
}
writeErr(reqContext, err)
return true
reqContext.LookupTokenErr = err
return false
}
reqContext.IsSignedIn = true