14285: Add token middleware. Require management token for metrics.
[arvados.git] / services / arv-git-httpd / auth_handler.go
index b4dc58b24fc1cb1436cbb1db9dbc6b73deec373c..3b3032afda5d9707616ce474c431e10d2e629e37 100644 (file)
@@ -91,7 +91,7 @@ func (h *authHandler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
                httpserver.Log(r.RemoteAddr, passwordToLog, w.WroteStatus(), statusText, repoName, r.Method, r.URL.Path)
        }()
 
-       creds := auth.NewCredentialsFromHTTPRequest(r)
+       creds := auth.CredentialsFromRequest(r)
        if len(creds.Tokens) == 0 {
                statusCode, statusText = http.StatusUnauthorized, "no credentials provided"
                w.Header().Add("WWW-Authenticate", "Basic realm=\"git\"")