Skip to main content

get_or_refresh

Function get_or_refresh 

Source
pub fn get_or_refresh(config: &CliConfig) -> Result<CachedOrgTicket>
Expand description

Get a valid org ticket, fetching from API if needed

This function:

  1. Tries to load a cached ticket
  2. If cached ticket is valid (not expired), returns it
  3. If no cache or expired, fetches a new ticket from the API
  4. Caches the new ticket and returns it