(w http.ResponseWriter, shortID string)
| 85 | } |
| 86 | |
| 87 | func unauthorized(w http.ResponseWriter, shortID string) { |
| 88 | w.Header().Set("WWW-Authenticate", fmt.Sprintf(`Basic realm="Authorization Required (%s)"`, shortID)) |
| 89 | http.Error(w, "Not Authorized", http.StatusUnauthorized) |
| 90 | } |
| 91 | |
| 92 | func forbidden(w http.ResponseWriter) { |
| 93 | http.Error(w, "Forbidden", http.StatusForbidden) |