pub async fn poll<F, Fut>(
client: &Client,
base_url: &str,
client_id: &str,
device_code: &str,
initial_interval: u64,
expires_in: u64,
sleep: F,
) -> Result<PollSuccess, ClientError>Expand description
Poll {base_url}/oauth2/v2.0/token per RFC 8628 §3.5.
Returns when the user has approved consent, or with an error on denial / expiry.
The sleep parameter is a closure so tests can inject a fast no-op sleep
instead of real tokio::time::sleep.