(authObject auth.Auth)
| 215 | } |
| 216 | |
| 217 | func apiKeyStatusHandler(authObject auth.Auth) http.HandlerFunc { |
| 218 | return func(w http.ResponseWriter, r *http.Request) { |
| 219 | jsonWrite(w, map[string]bool{"configured": authObject.IsApiKeyConfigured()}) |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | // regenerateApiKeyHandler creates or rotates the API key. Requires the admin password (a leaked API key cannot self-rotate) |
| 224 | func regenerateApiKeyHandler(authObject auth.Auth) http.HandlerFunc { |
no test coverage detected