RespondUnauthorized responds with unauthorized
(w http.ResponseWriter)
| 39 | |
| 40 | // RespondUnauthorized responds with unauthorized |
| 41 | func RespondUnauthorized(w http.ResponseWriter) { |
| 42 | UnsetSessionCookie(w) |
| 43 | w.Header().Add("WWW-Authenticate", `Bearer realm="Dnote", charset="UTF-8"`) |
| 44 | http.Error(w, "unauthorized", http.StatusUnauthorized) |
| 45 | } |
| 46 | |
| 47 | // RespondNotFound responds with not found |
| 48 | func RespondNotFound(w http.ResponseWriter) { |
no test coverage detected