(&self, req: ServiceRequest)
| 63 | forward_ready!(service); |
| 64 | |
| 65 | fn call(&self, req: ServiceRequest) -> Self::Future { |
| 66 | let claims = authentication_middleware(&req, &self.active_sessions); |
| 67 | |
| 68 | let claims = match claims { |
| 69 | Ok(claims) => claims, |
| 70 | Err(e) => return Box::pin(async move { Err(e.into()) }), |
| 71 | }; |
| 72 | |
| 73 | req.extensions_mut().insert(claims); |
| 74 | |
| 75 | let fut = self.service.call(req); |
| 76 | Box::pin(async move { |
| 77 | let res = fut.await?; |
| 78 | Ok(res) |
| 79 | }) |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | fn authentication_middleware( |
nothing calls this directly
no test coverage detected