pub async fn auth_middleware( config: ApiAuthMiddlewareConfig, req: Request, next: Next, ) -> Response