Skip to main content

parse_token

Function parse_token 

Source
pub fn parse_token(text: &str) -> Option<(String, Option<SystemTime>)>
Expand description

The token and expiry from az account get-access-token --output json. Newer az gives expires_on in seconds; older gives only expiresOn in local time, which is not worth guessing at, so such a token is refreshed on the next request.