From d22bd51eebd314c7301d8b6df9d954d54596d3dc Mon Sep 17 00:00:00 2001 From: Joe Stump Date: Fri, 2 Jan 2026 21:47:18 +0000 Subject: [PATCH] Fix more lint issues --- server/auth.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/server/auth.go b/server/auth.go index 98466e6c0..435d976eb 100644 --- a/server/auth.go +++ b/server/auth.go @@ -237,7 +237,7 @@ func validateLoginLDAP(userRepo model.UserRepository, userName, password string) } u, err := userRepo.FindByUsername(userName) - if err == model.ErrNotFound { + if errors.Is(err, model.ErrNotFound) { u = &model.User{UserName: userName} } u.Name = name @@ -256,15 +256,6 @@ func validateLoginLDAP(userRepo model.UserRepository, userName, password string) return u, nil } -// This method maps the custom authorization header to the default 'Authorization', used by the jwtauth library -func authHeaderMapper(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - bearer := r.Header.Get(consts.UIAuthorizationHeader) - r.Header.Set("Authorization", bearer) - next.ServeHTTP(w, r) - }) -} - func JWTVerifier(next http.Handler) http.Handler { return jwtauth.Verify(auth.TokenAuth, tokenFromHeader, jwtauth.TokenFromCookie, jwtauth.TokenFromQuery)(next) }