Skip to main content

decide_nonce_outcome

Function decide_nonce_outcome 

Source
pub fn decide_nonce_outcome(
    attempt: u8,
    response_ok: bool,
    status: u16,
    body: &str,
    fresh_nonce_header: Option<&str>,
) -> NonceOutcome
Expand description

Decide the next action for a token-exchange fetch attempt.

attempt is 0 for the bootstrap request, 1 for the nonce retry. Only a bootstrap attempt (attempt == 0) may be retried; a failure on attempt 1 is always NonceOutcome::Failed (RFC 9449 ยง8 bounds the retry to one round-trip so a malicious/misbehaving AS cannot force an infinite loop).