update 401 & 403.

This commit is contained in:
Miroslav Šedivý 2020-11-18 22:34:42 +01:00
parent 18ca647c76
commit 1ae6f05c73

View File

@ -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{}) {