From 1ae6f05c736030a5380ea38dfa78f396cce45dfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 18 Nov 2020 22:34:42 +0100 Subject: [PATCH] update 401 & 403. --- internal/utils/http.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/utils/http.go b/internal/utils/http.go index 901e86b9..f520f010 100644 --- a/internal/utils/http.go +++ b/internal/utils/http.go @@ -50,12 +50,12 @@ func HttpBadRequest(w http.ResponseWriter, res ...interface{}) { defHttpError(w, http.StatusBadRequest, "Bad Request.", res...) } -func HttpNotAuthenticated(w http.ResponseWriter, res ...interface{}) { - defHttpError(w, http.StatusUnauthorized, "Invalid or missing access token.", res...) +func HttpNotAuthorized(w http.ResponseWriter, res ...interface{}) { + defHttpError(w, http.StatusUnauthorized, "Access token does not have the required scope.", res...) } -func HttpNotAuthorized(w http.ResponseWriter, res ...interface{}) { - defHttpError(w, http.StatusForbidden, "Access token does not have the required scope.", res...) +func HttpNotAuthenticated(w http.ResponseWriter, res ...interface{}) { + defHttpError(w, http.StatusForbidden, "Invalid or missing access token.", res...) } func HttpNotFound(w http.ResponseWriter, res ...interface{}) {