changeset 333:154e0f5bff0a

If logging in failed send Unauthorized to client.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 03 Aug 2018 16:04:14 +0200
parents 394fafeb4052
children df1fc589ad9d bd292a554b6e
files controllers/token.go
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/controllers/token.go	Fri Aug 03 15:46:05 2018 +0200
+++ b/controllers/token.go	Fri Aug 03 16:04:14 2018 +0200
@@ -70,7 +70,7 @@
 
 	token, session, err := auth.GenerateSession(user, password)
 	if err != nil {
-		http.Error(rw, fmt.Sprintf("error: %v", err), http.StatusInternalServerError)
+		http.Error(rw, fmt.Sprintf("error: %v", err), http.StatusUnauthorized)
 		return
 	}