- Response::builder()
- .status(StatusCode::OK)
- .header(header::CONTENT_TYPE, "text/html")
- .body(index.into())
- .unwrap()
- })
+ let index = "<center><h1>Proxmox Backup API Server</h1></center>";
+
+ Response::builder()
+ .status(StatusCode::OK)
+ .header(hyper::header::CONTENT_TYPE, "text/html")
+ .body(index.into())
+ .unwrap()
+ })
+ }
+
+ fn check_auth<'a>(
+ &'a self,
+ headers: &'a HeaderMap,
+ method: &'a Method,
+ ) -> Pin<Box<dyn Future<Output = Result<(String, Box<dyn UserInformation + Sync + Send>), AuthError>> + Send + 'a>> {
+ Box::pin(async move {
+ check_pbs_auth(headers, method).await
+ })
+ }