async fn attempt_access(
client: &PasswordManagerClient,
send_id: &str,
access_key: &SendAccessKey,
inputs: &ReceiveInputs,
) -> Result<SendAccessTokenResponse>Expand description
Negotiate a send-access token, prompting for whatever credential the server says the Send
needs. Mirrors the legacy attemptAccess: ask with no credentials first and branch on the
typed send_access_error_type the server returns.
Legacy wraps every token request in a 3-attempt retry loop (getTokenWithRetry) for a
{kind: "expired"} case tied to its persistent send-access-token cache, itself keyed on
sendId alone with no host component — part of what PM-40120 tracks. This port’s own cache
(send_access_token_cache) is keyed on (resolved_host, send_id) instead, and evicts
rather than retries on a rejected cached token (see run_receive), so there’s no
multi-attempt loop to replicate here.