iqm.iqm_client.cli.token_manager.start_token_manager#
- iqm.iqm_client.cli.token_manager.start_token_manager(cycle: int, config: ConfigFile, single_run: bool = False) None #
Refresh tokens periodically.
For each refresh cycle new tokens are requested from auth server. - If refresh is successful next refresh is attempted in the next cycle. - If auth server does not respond refresh is attempted repeatedly until it succeeds or
the existing refresh token expires.
If auth server responds but returns an error code or invalid tokens token manager is stopped.
- Parameters:
cycle (int) – refresh cycle in seconds
config (ConfigFile) – IQM Client CLI configuration
single_run (bool) – if True, refresh tokens only once and exit; otherwise repeat refreshing indefinitely
- Return type:
None