Skip to main content

parse_response

Function parse_response 

Source
pub fn parse_response(
    body: &str,
    now_ms: u64,
) -> Result<TokenRefreshResult, AuthError>
Expand description

Parse an OAuth token-refresh JSON response body.

now_ms is the current time in milliseconds since Unix epoch; it is used to compute the absolute expires_at_ms value.

Does not require serde or any external parser — operates on raw string needles so it is always available regardless of feature flags.

§Errors

Returns AuthError::ResponseParse if any required field is absent or cannot be interpreted as the expected type.