diff --git a/controllers/auth.go b/controllers/auth.go index d1f3245..6d917f1 100644 --- a/controllers/auth.go +++ b/controllers/auth.go @@ -210,7 +210,8 @@ func Login(c *gin.Context) { c.JSON(http.StatusUnauthorized, gin.H{"error": "username or password is incorrect."}) return } else { - log.Printf("Login verified, returning token '%s'\n", token) + //log.Printf("Login verified, returning token '%s'\n", token) + log.Printf("Login verified, returning token\n") } c.JSON(http.StatusOK, gin.H{"access_token": token}) diff --git a/models/user.go b/models/user.go index e961f18..c240bf9 100644 --- a/models/user.go +++ b/models/user.go @@ -107,7 +107,7 @@ func VerifyPassword(password, hashedPassword string) error { return errors.New("unable to compare password with empty hash") } - log.Printf("VerifyPassword comparing input against hashed value '%s'\n", hashedPassword) + //log.Printf("VerifyPassword comparing input against hashed value '%s'\n", hashedPassword) return bcrypt.CompareHashAndPassword([]byte(hashedPassword), []byte(password)) } @@ -154,10 +154,11 @@ func LoginCheck(username string, password string) (string, error) { return "", errors.New(errString) } } else { - log.Printf("LoginCheck retrieved user '%v' from database\n", u) + //log.Printf("LoginCheck retrieved user '%v' from database\n", u) + log.Printf("LoginCheck retrieved user id '%d' from database\n", u.UserId) } - log.Printf("u: %v\n", u) + //log.Printf("u: %v\n", u) if !u.LdapUser { // Locally defined user, perform password verification