|
|
|
@ -173,11 +173,13 @@ func login(s *AuthServer) http.HandlerFunc { |
|
|
|
|
s.logger.Error(status.Message()) |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
w.WriteHeader(http.StatusUnauthorized) |
|
|
|
|
w.Write([]byte(status.Message())) |
|
|
|
|
|
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
w.WriteHeader(http.StatusOK) |
|
|
|
|
w.Write([]byte(fmt.Sprintf("Success login for %s", uid))) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -195,6 +197,7 @@ func registration(s *AuthServer) http.HandlerFunc { |
|
|
|
|
s.logger.Error(status.Message()) |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
w.WriteHeader(http.StatusUnauthorized) |
|
|
|
|
w.Write([]byte(status.Message())) |
|
|
|
|
|
|
|
|
|
return |
|
|
|
@ -204,6 +207,7 @@ func registration(s *AuthServer) http.HandlerFunc { |
|
|
|
|
s.prometheus.IncUsersRegistered() |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
w.WriteHeader(http.StatusOK) |
|
|
|
|
w.Write([]byte(fmt.Sprintf("Success registration for %s", uid))) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -219,6 +223,7 @@ func confirmation(s *AuthServer) http.HandlerFunc { |
|
|
|
|
s.logger.Error(status.Message()) |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
w.WriteHeader(http.StatusUnauthorized) |
|
|
|
|
w.Write([]byte(status.Message())) |
|
|
|
|
|
|
|
|
|
return |
|
|
|
@ -228,6 +233,7 @@ func confirmation(s *AuthServer) http.HandlerFunc { |
|
|
|
|
s.prometheus.IncUsersConfirmed() |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
w.WriteHeader(http.StatusOK) |
|
|
|
|
w.Write([]byte(fmt.Sprintf("Success confirmation for %s", code))) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|