pub(crate) fn build_sdk_client(
api_url: String,
identity_url: String,
timeout: Duration,
last_ok_tx: Sender<Instant>,
) -> (Client, AccessConnectorTokenHandler)Expand description
Builds the SDK client the connector runs against, plus the handler that carries its session.
Core only disables redirect-following when extra middleware is supplied, so the middleware vec must stay non-empty. These endpoints never redirect; following one would treat another host’s reply as the API’s and, on a 307, forward the encrypted cipher body.
The timeout is outermost, so it also bounds token renewal. ConnectivityMiddleware sits
outside the auth middleware, so a 401 retried into a 2xx counts once.