MCPcopy Create free account
hub / github.com/dwavesystems/dwave-cloud-client / ensure_active_token

Method ensure_active_token

dwave/cloud/auth/flows.py:277–282  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

275 return response.ok
276
277 def ensure_active_token(self):
278 if not self.token:
279 return False
280 is_active = self.session.ensure_active_token(token=self.token)
281 self._save_token_to_creds(self.token)
282 return is_active
283
284 def token_expires_soon(self, within: int = 60) -> Optional[bool]:
285 """Is the token expired, or expires soon (within the next ``within`` seconds)?"""

Callers 2

_loginFunction · 0.80

Calls 1

_save_token_to_credsMethod · 0.95

Tested by 1