IsEnabled returns false if basic authentication isn't enabled.
()
| 44 | |
| 45 | // IsEnabled returns false if basic authentication isn't enabled. |
| 46 | func (b BasicAuth) IsEnabled() bool { |
| 47 | return b.Username != "" || b.Password.Value != "" |
| 48 | } |
| 49 | |
| 50 | // WriteJSONResponse writes some JSON as a HTTP response. |
| 51 | func WriteJSONResponse(w http.ResponseWriter, v any) { |