Authn: Remove response writer from auth req (#90110)

Authn: Remove response writer from request
This commit is contained in:
Karl Persson
2024-07-05 11:42:12 +02:00
committed by GitHub
parent 87d86e81ce
commit 7a78ad3893
6 changed files with 3 additions and 16 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ func (hs *HTTPServer) LoginAPIPing(c *contextmodel.ReqContext) response.Response
}
func (hs *HTTPServer) LoginPost(c *contextmodel.ReqContext) response.Response {
identity, err := hs.authnService.Login(c.Req.Context(), authn.ClientForm, &authn.Request{HTTPRequest: c.Req, Resp: c.Resp})
identity, err := hs.authnService.Login(c.Req.Context(), authn.ClientForm, &authn.Request{HTTPRequest: c.Req})
if err != nil {
tokenErr := &auth.CreateTokenErr{}
if errors.As(err, &tokenErr) {
+1 -1
View File
@@ -28,7 +28,7 @@ func (hs *HTTPServer) OAuthLogin(reqCtx *contextmodel.ReqContext) {
code := reqCtx.Query("code")
req := &authn.Request{HTTPRequest: reqCtx.Req, Resp: reqCtx.Resp}
req := &authn.Request{HTTPRequest: reqCtx.Req}
if code == "" {
redirect, err := hs.authnService.RedirectURL(reqCtx.Req.Context(), authn.ClientWithPrefix(name), req)
if err != nil {