diff --git a/auth/auth.go b/auth/auth.go index ccc7fd405b2990b073d626996110e776a6b06d38..3984b08cb0afe686be00ad19a792c162ac97bfed 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -60,8 +60,8 @@ func Init(c *Config) (err error) { } func login(w http.ResponseWriter, r *http.Request) { - method := r.URL.Query().Get("method") - switch strings.ToLower(method) { + backend := r.URL.Query().Get("backend") + switch strings.ToLower(backend) { case "oidc": if auth.oidc == nil { sendHTTPResponse(w, http.StatusBadRequest, HTTPResponse{Error: "OIDC authentication is not configured"}) @@ -69,9 +69,9 @@ func login(w http.ResponseWriter, r *http.Request) { } auth.oidc.HandleLogin(w, r) case "": - sendHTTPResponse(w, http.StatusNotImplemented, HTTPResponse{Error: "default/fallback authentication method has not been implemented yet"}) + sendHTTPResponse(w, http.StatusNotImplemented, HTTPResponse{Error: "default/fallback authentication backend has not been implemented yet"}) default: - sendHTTPResponse(w, http.StatusBadRequest, HTTPResponse{Error: "invalid authentication method: " + method}) + sendHTTPResponse(w, http.StatusBadRequest, HTTPResponse{Error: "invalid authentication backend: " + backend}) } }