From 4c07de524cc1bbe4c0f8f16c96d2f13d0187d0ff Mon Sep 17 00:00:00 2001 From: Christian Pointner <equinox@helsinki.at> Date: Wed, 27 Mar 2019 01:43:02 +0100 Subject: [PATCH] auth backend vs method --- auth/auth.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/auth/auth.go b/auth/auth.go index ccc7fd4..3984b08 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}) } } -- GitLab